Tack's Deus Ex Lab

What this site is

 Contact info

 Links

Last updated December 28, 2002

Recent changes:

Updated HTML Help version of site
General cleanup of main page
New tutorial: DataVault Images
New tutorial: Dispatchers
New tutorial: Intro to Triggers
New tutorial: Creating masked textures using Bright
New section: Deep Thoughts

Mesh Utilities and Info

Unreal to Deus Ex Mesh Converter, v1.2

3D Studio to Deus Ex Mesh Converter, v1.0

Tack's Deus Ex Mesh Tool: Mesh Extractor and Converter

A word about mesh resolution

Click on picture to download a rough version of a mini-gun model in MilkShape format
(Click here for details)

Deep Thoughts by Steve Tack

Intro to the Deus Ex SDK
The Absolute Basics: Getting started with the Deus Ex SDK

Chapter 1: UnrealEd Basics
Navigating UnrealEd: An UnrealEd Reference Guide
Keyboard Shortcuts (at Wolf's Unreal)
Wolf's Basic Tutorial (at Wolf's Unreal), this is a must-read before you go on.
UnrealEd Terminology
Placing items into your maps

Chapter 2: Making Deus Ex Maps
 General guidelines
Intro to making multi-player maps
Add a Deus Ex style door
Add a nanokey (and PickupDistributor tutorial)
Add a working keypad
Add breakable crates (with goodies inside)
Add a working light switch
Add an NPC, set up alliances, and use the AllianceTrigger
Add a security camera
Add an automated gun turret
Add a working security console
Set up computers
Add a control panel and laser triggers
Add an alarm unit
Add a ladder
Add water
Add a DamageTrigger (poison gas, radiation, electric shock, etc)
Add "Pain Zones" (alternative to poison gas, radiation, electric shock, etc)
Add a Sky Zone (a.k.a. "sky box")
Add glass windows (breakable or not)
Add breakable walls
Add ambient sounds
Set up in-game music
Add an elevator: Part 1 Part 2 Part 3
Add an earthquake
Making and using prefabs

Chapter 3: Beyond Basic Mapping
Setting up your own packages
Add a personal computer and set up e-mail & "special options"
Add a public computer and set up bulletins
Add DataCubes, books and newspapers
How to get the mission startup text to show up
More Fun with Zones (gravity, friction, ambient lighting, fog, optimization)
Intro to Triggers
Triggers: Dispatchers (queuing up events to trigger)
Navigation points: Patrol Points
Interpolation points and interpolation triggers (movin' stuff around)
Visible light beams
Click here for a list of possible future topics for this section

Chapter 4: "Making Conversation" with ConEdit
 Intro to ConEdit: Creating basic conversations
Click here for a list of possible future ConEdit topics

Chapter 5: Adding Custom Elements to Deus Ex
 Adding custom textures
How to create masked textures using Photoshop
How to create masked textures using Bright
Adding DataVault images
Adding custom sound effects
Creating custom music
Re-skinning character meshes to create new characters
Adding custom meshes (models)
Organizing multiple mesh import files
Creating custom "pickups" (an introduction to coding with UnrealScript)

Chapter 6: Putting it all together
 Linking maps together (using Teleporters)
Major transitions between maps using MapExit (making Jock's helicopter fly)
Intro/End Game cut scenes (cinematics) using CameraPoints
Distributing your missions: Setting up for the "TeamUC Mod Loader" (DeusExML)
Distributing your missions: Using the NSIS installer

UnrealScript
 Please read this first
Creating and setting a custom player class (using the Team UC Mod Loader)
Creating and setting a custom player class (without the Mod Loader)
Custom scrolling end credits
Custom computer nodes

Reference Guides and Tips
UnrealEd Reference Guide
Colored Lighting Guide
Augmentation Pairs List
Miscellaneous Tips & Tricks
Brush Tips & Tricks

Note that items marked with a strikethrough are hopefully "coming soon"

Download entire site as an HTML Help file (2.6 MB)
(HTML Help file last updated Dec. 28, 2002)


What this site is

This site is really just a way for me to learn stuff about the Deus Ex SDK. After all, they say the best way to learn something is to TEACH it. As I'm learning things, I'm writing up some of what I've learned as step-by-step tutorials. I've found that attempting to explain a particular task in detail reveals a lot of holes in my knowledge that I then try to fill. It's also a way to document exactly how the use the SDK in a way that I'll be able to understand later. Most of the topics are not 100% exhaustive, but should be enough to get the ball rolling. Many of the details can be worked out by experimentation or by looking at the existing maps.

I've gone ahead and made the pages publicly available as an aid to those who may be at a similar level as myself and to get feedback on any errors or omissions (assuming anybody uses the site, of course!).

This site is NOT an exercise in graphic design; it is meant as a collection of straightforward, easy-to-print pages without a lot of fuss. It is not a repository of other folks' tutorials or levels and there are no forums here. Though there are a few links to external sites, all of the material ON this site is written by me.

However, if you do have some useful information or tips that you want to pass along, but don't want to write up your own tutorial, let me know and I can write up the information in my own words and style and put it here. Also, if you have a request to cover a particular topic, I'll see what I can do.

Back to main page


Contact info

Steve Tack
E-mail: stack@planetdeusex.com


Links

Here are some Unreal and Deus Ex SDK related links you may find helpful.

Tutorials and General SDK Stuff

Universal Constructor - Not to be confused with Team UC or the UC Mod, this is a tutorial site similar to this one, but with some actual web design. :)
Unrealed.exe - Strange name, but you'll find a large number of helpful UnrealEd tutorials (most are applicable to Deus Ex)
Unreal Technology - The interesting parts are under Level Design, Programming, and Other Content Creation. Kind of a mish-mash of info, but there's quite a bit of helpful stuff in there, especially the UnrealScript bits
Wolf's Unreal - There's a good chance you've already been here; in any case, these are some of the best tutorials you're going to find, especially the beginning one
Jered's ConEdit tutorials - These are hosted by DXEditing. The site itself seems to be unavailable, but you can still get to Jered's tutorials directly.
Deus Ex Ed - Another site covering the Deus Ex SDK
Deus-Ex.Org - Yet another DX SDK site. Lot of forums
TeamUC - Home of the UC Mod, Mod Loader, and more
Planet Deus Ex - A general Deus Ex site that covers mods in development
Lode's Tutorials - Some pretty detailed tutorials about lighting and movers; covers some of the more obscure features. These are specific to Unreal Tournament, but most of the material applied to Deus Ex as well.

Deus Ex: ZODIAC - ZODIAC is a mod I started as a little solo project to get some mapping experience in. It's no longer just me working on it though.

3D Modeling/Animation

polycount Unreal Tools - Some skinning and modeling tools
chUmbaLum sOft - Makers of Milkshape 3D, a $20 modeler that can export to Unreal's .3d format
MilkShape modeling tutorials by ISO - MilkShape tutorials in "screen cam" AVI format

General Deus Ex Stuff

Hibix.com gamer's search engine - some links to general Deus Ex stuff, like DX mods and general DX sites


DataVault Images

Adding DataVault Images

Prerequisites:
How to add custom packages
How to add custom textures

Overview:
So you want have some of those DataVault images in your map? Read on.

1. Create the image

The first step is to actually create the image. It might be a floor plan of your level, or it might just be some "flavor", like a photo of a character you are supposed to meet. Make it a 400 x 400 image in Photoshop or whatever your favorite image editor is. For now, sticking with 24-bit color will work out the best.

At some point, you'll need to "pad" the right and bottom of the image to 512 x 512 pixels (sticking with black for the extraneous area would be a good idea). In Photoshop that is easily done by using the Canvas Size option. That will look something like this in Photoshop:

2. Convert the image to 8-bit color

Now you'll need to convert the entire image to 8-bit color. You can use your image editor to do that, but I highly recommend you use the Bright utility or the Bright Photoshop plug-in. The reason you want to convert to 8-bit before the next step, is so that all four of your images end up with the same color palette. That's important for the DataVault image to look right.

3. Chop the image into four different textures

Now you'll need to do some cropping in your image editor. How exactly you do this step is up to you, but one approach would be to pull up four copies of your converted 512 x 512 image and crop four 256 x 256 images from that. What you'll end up with is four images that look something like this:

Image_HQ_1.pcx | Image_HQ_2.pcx
Image_HQ_3.pcx | Image_HQ_4.pcx

It's not strictly necessary, but it's a good idea to keep the filenames the same, but numbered in sequence, as shown above.

4. Import the four textures

As you might have guessed, you *will* need to import these textures into an Unreal package for them to show up. If you need more info on that, see How to add custom textures.

NOTE: You don't need to generate MIP-maps for these textures, since they will be only used in the 2D user interface.

5. Create a new DataVault image class

Now don't freak out, but you'll have to do a little typing in Notepad here. Since you've followed the prerequisites, you already know how to set up custom packages and classes, so it shouldn't be a problem. Create a new text file under your package folder's Classes folder, and call it Image_HQ.uc (or whatever you want, if you know what you're doing).

Type this in, where "MyPackage" is the name of your package, and the texture names correspond to what you called them when you imported them in Step 3. (these are not filenames, but the names in your texture package or .u package)

//=============================================================================
// Image_HQ
//=============================================================================

class Image_HQ expands DataVaultImage;

defaultproperties
{
imageTextures(0)=Texture'MyPackage.Image_HQ_1'
imageTextures(1)=Texture'MyPackage.Image_HQ_2'
imageTextures(2)=Texture'MyPackage.Image_HQ_3'
imageTextures(3)=Texture'MyPackage.Image_HQ_4'
imageDescription="CIA Headquarters Satellite Photo"
colNoteTextNormal=(R=50,G=50)
colNoteTextFocus=(R=0,G=0)
colNoteBackground=(R=32,G=32)
}

imageTextures(0) through imageTextures(3) correspond to the four images that make up a complete DataVault image. They are from left to right, then top to bottom. The imageDescription is will be visible to the player in various parts of the interface, so call it something appropriate.

6. Build your custom package

Save your map and exit UnrealEd. Run "ucc make" and build your package. Remember to first delete your current .u file if you've previously built it.

7. Provide a way to transfer the image to the player and try it out

The easiest way to test out your DataVault image is by using a DataCube. Add a DataCube to your map, and set its InformationDevices -> imageClass to your new DataVault image class name. To avoid making a typo, expand Inventory -> DataVaultImage in the Class browser, select your custom image class, go back to the imageClass property in the DataCube, and hit the Use button. Or just type it in as shown here:

IMPORTANT: You can use the Transfer Object event in ConEdit to transfer DataVault images from the original game to the player, but NOT custom ones. There is a major limitation in ConEdit that prevents items from custom packages from being used. I made a custom trigger that I use to get around that for DataVault images. If you ask me nicely, I'll probably send it to you. :)

Now try it out. Right-click on your DataCube and the image should transfer. Pull up your Images screen. That's it!


Dispatchers

Prerequisites:
Intro to Triggers

Overview:
What's a Dispatcher and why would you want to use it? A Dispatcher lets you fire off a series of events with delays between each. It's also handy if you just want to pause a certain amount of time before a single event is fired. Up to eight events can be fired.

Why would you use them? You might want to set up a fancy sequence of doors opening, or you might want to have an elevator go to a certain floor, open some doors, then play a sound effect. Or you might want to have an AllianceTrigger fire some time after another event. There are all kinds of things you can do.

Download:
Example map (6K)

1. Place your Dispatcher

First, build a basic room and stick a light and a PlayerStart it in. Rebuild. Now go to the Class browser and select Dispatcher under Triggers.

Point at your room's floor and hit the "A" key. The Dispatcher will look like this in the editor:

2. Set its properties

We're going to fire off three different events in a row, with a one second pause between each one. Expand Dispatcher -> OutDelays and set [1] to 1.0 and [2] to 1.0. Leave [0] as 0.0. What the heck does all of that mean? It means that there will be no pause before the first event, a one second pause before the second event, and a one second pause before the third event.

Now expand Dispatcher -> OutEvents and fill in the following values for the first three items: one, two, three. These would of course have more meaningful names in the context of a real map.

Finally, set the Dispatcher's Events -> Tag value to dispatcher1.

NOTE: A Dispatcher won't draw any red lines to the things it will trigger.

3. Set up stuff to trigger

We set up the Dispatcher to fire off events called one, two, and three, but there's nothing with those Tag values in the map. Time to fix that. Add three or more of anything you want to trigger and set their Tag values to one, two, and three.

In my example map, I added three TriggerLight's (with their Object -> InitialState values set to TriggerToggle), as well as three SpecialEvent triggers to play sound effects.

4. Add a regular trigger

Bet you thought you were done, huh? Not quite. Dispatchers can't be triggered by running into them, so we still need a way for the Dispatcher itself to get triggered. So add a regular trigger to your map and set its Events -> Event value to dispatcher1. You should see a red line from the trigger to the Dispatcher. Now when you run into the regular trigger, the Dispatcher will get fired and the one, two, and three events will be generated.

5. Try it out

Try out your map. If you want to try the example map, step inside the circle, and the lights and sound effects will get fired in sequence. Step outside of the circle and then back in, and the lights will turn *off* in sequence.


Intro to Triggers

Overview:
Triggers are one of the more common and useful things to use in a map, so I'll try to cover the basics. While this *is* a pretty basic tutorial, I find it's best to start with "baby steps" and go from there.

First I'll cover the absolute basics, and then start to get more in depth.

Example map:
Intro to triggers (8K)

What is a trigger?

A trigger is something you put into a map that can respond to some event (usually the result of something the player or an NPC has done) and cause something to happen. Some common examples are a light switch for turning lights on and off, a button that opens and closes a door, and invisible areas that can "trigger" InfoLink messages, award skill points, and cause various types of damage.

Many triggers can be set up to respond to the player walking within a certain distance of the trigger, but some must be triggered by other triggers.

In this tutorial, we'll add a simple generic trigger that will cause an alarm panel to sound the alarm. The alarm unit and alarm light make an interesting examples, since they will stop when the player steps outside of the trigger's radius.

1. Set up something to trigger

Create a basic room, add a light and a PlayerStart, and rebuild. Now add an AlarmUnit to your map and set its Events -> Tag value to alarm1.

2. Add a basic trigger

Now add a basic trigger. First select Trigger under Actor -> Triggers in the Class browser:

Then point to the floor of your room and hit the "A" key.

3. Set up the trigger's properties

Next we want to set up two things on the trigger: what to trigger and the collision radius.

Right-click on your trigger and pull up its properties. Set Events -> Event to alarm1. Since that was the tag value of the AlarmUnit, you should now see a red line connecting your trigger with your alarm unit. At this point, your trigger will cause the alarm to sound when the player walks into it.

Often you will want to adjust the size of the trigger's detection range. But first, you'll want to enable Radii View in the overhead 2D window. Do that by pulling down the 2D window menu and selecting Actors -> Radii View.

Now when you select your trigger, you'll be able to see its collision radius as a red circle around the trigger in the overhead 2D view.

To adjust the radius, pull up the trigger's properties and set Collision -> CollisionRadius to some value. In the example map, I set it to 32 to match a circle on the ground. This value is in Unreal units.

You can also set the CollisionHeight value. In this example, you don't really need to, but there are times when it's handy. This time, enable Radii View in one of the other 2D views (a side view, not the overhead view). You'll see a side view of the collision cylinder, which shows up as a box rather than a circle. This will show you the collision height. I've altered this screen shot a bit so that the collision cylinder is more visible. It's pretty faint otherwise:

NOTE: The collision cylinder is not visible in the 3D window.

4. Try it out

Run your map and set into your trigger's radius. The alarm should sound as long as you're standing within the radius value. That's it for the basics. I'll continue on just a bit more with some more detail.

5. Set up more things to trigger (optional)

In the example map, I added an alarm light and set its Tag value to alarm1, just to illustrate that you can trigger multiple actions with one trigger.

I also added a mover and set its Tag to alarm1 and its Object -> InitialState value to TriggerControl. This is kind of an unusual setting, as you would normally use TriggerToggle and use a "switch" type of trigger like Button1, Switch1, or Switch2 to allow a door to open and close. TriggerControl will leave the door open only when you're standing in the trigger's radius.

More Info

It's important to realize that not all triggers are listed under "Triggers" in the class browser and that they don't all act the same. Some of them are more suitable for toggling things on and off, some can't be activated by running into them (they must be triggered by another trigger), and some can *only* be activated by running into them.

Some examples of actors that can act as triggers:
Button1, LightSwitch, Switch1, Switch2, Trigger, Dispatcher, BeamTrigger

Some special purpose triggers (these are self-contained and trigger some action by themselves):
GoalCompleteTrigger, DataLinkTrigger (NOTE: the term "InfoLink" is used in the game), Teleporter, AllianceTrigger

Some actors that respond to triggers:
Movers, TriggerLight, most types of triggers

NOTE: In some cases, an actor has to be set up to respond to a trigger. For example, you must set the Object -> InitialState property of a TriggerLight to something for it to work.


How to create masked textures

How to create masked textures (with Bright)

Prerequisites:
The Basics

Overview:
You might need to create textures where some of the texture is transparent. Those are called "masked textures". They can be used on brush surfaces that are set up as masked, on model surfaces where polygons have been marked as masked, or for certain HUD elements like belt icons. Creating Deus Ex compatible masked textures using the "Bright" utility is pretty easy.

SIDE NOTE: Bright is a really excellent free utility for converting 24-bit images to 8-bit color. It's worth using, even for regular non-masked textures.

Download:
Bright (186 K), this includes the command-line version of Bright and the Photoshop filter

1. Create the texture with transparent areas

You'll need to use a unique color to fill in the pixels that you want to be transparent. This part works just like setting up transparent areas of a GIF file, if you've ever done that.

For this example, you'll use purple. That is, the RGB value Red=255, Green=0, Blue=255. The exact procedure for selecting that exact color varies depending on what image editor you use, but there should be an option for entering those values manually.

Save your texture as a 24-bit BMP or TGA file.

2. Convert with Bright

Bright has an option for putting your special color in the right place in the color palette. You don't really need to know what that means. :) All you do is use the -pinkmask option with the command line version, like this:

> bright -pinkmask MedKit.tga MedKit.pcx

Now I'm not going to give you a lesson in the DOS-like command prompt in Windows, so you're on your own there. :) There are a ton of other options with Bright, so be sure to check out the Readme file.

If you need to know how to import the texture, see How to add custom textures.

NOTE: If you use method #1 described in the above link, you can check "Masked" when importing the texture or if you use method #2, you can add "FLAGS=2" to the end of the import line. Either of those will default any brush surfaces to "Masked" when the texture is applied. It's not necessary, but it saves a step.


Deep Thoughts

Deep Thoughts, by Steve Tack

Here's a little section where I can dump random thoughts related to Deus Ex editing. It's stuff that doesn't fit into a "tutorial" format:

Getting ready for Deus Ex 2 editing

Possible future topics:

* Before you start a DX mod: Reality check
* My DX multiplayer rant
* Workflow
* Game balance
* Why proper scale is important
* Thinking outside of the cube

"If you ever fall off the Sears Tower, just go real limp, because maybe you'll look like a dummy and people will try to catch you because, hey, free dummy."


Unreal to Deus Ex mesh converter

Download it here:
Unreal to Deus Ex mesh converter, version 1.2 (19 K)

Description

The Unreal to Deus Ex mesh converter is a little program I wrote that will convert a mesh (model) from the Unreal or Unreal Tournament format to the Deus Ex format. This allows you to use any existing utility that exports to Unreal format, such as MilkShape 3D, 3ds2unr, etc. In case you weren't aware, Deus Ex uses a slightly different mesh format than Unreal/UT. The reason for this seems to be to support higher "mesh resolution" which allows finer detail to be modeled in the game's meshes. As a result, if you attempt to import a mesh into Deus Ex that is in the current Unreal/UT format, you'll get a random, jumbled mess. Convert it with unr2de (Unreal to Deus Ex), however, and you're good to go.

Instructions

To use it, open up a command prompt (MS-DOS Prompt) and either copy the unr2de.exe file to a folder where you want to convert meshes, or put it in somewhere in your PATH. Make sure the two .3d files are in the same folder (your Unreal mesh will consist of two files: one ending with _a.3d and one ending with _d.3d).

At the command prompt, type in:

unr2de <Filename of your mesh before the "_" character>

In other words, if your mesh files are named BunnyDroid_a.3d and BunnyDroid_d.3d, you would type this in:

unr2de BunnyDroid

That's it!

This program will overwrite your "_a.3d" file, so if you want the original, be sure to back it up somewhere or rename it. It does require that the "_d.3d" file be in the same folder. See the readme.txt file for more information.

As of version 1.2, there is a new command line option for "fixing" files exported to Unreal/UT format from MilkShape 3D. Previously, it was necessary to use the Mirror Left <--> Right option in MilkShape before exporting. The new option is "-ms". To use it, you would type this in:

unr2de -ms BunnyDroid

NOTE: When using the "-ms" option, your _d.3d file will also be overwritten.

Milkshape 3D to Unreal export tips

These tips are just as applicable to Unreal and Unreal Tournament as they are to Deus Ex. They really have nothing to do with my converter, but it's information you will want to know when exporting Unreal meshes from MilkShape, trust me!

1. IMPORTANT: Before exporting to the Unreal format from MilkShape 3D, be sure to select all of the faces of your mesh and then use the "Mirror Left <--> Right" command from the Vertex menu. That will cause the left and right part of your mesh to be reversed, and it will also make all of your textures backwards. It will look weird in MilkShape, but as of version 1.4.1, you will need to do that for your mesh to properly export. In Deus Ex, it will look fine. I would recommend not saving the reversed version as a MilkShape file; after all, you may want to export the same mesh to Quake or something later. Just get in the habit of mirroring your model before you export to Unreal. And don't forget to run "unr2de" after you export of course! UPDATE: If you're using version 1.2 or highter of unr2de, you can simply use the "-ms" option instead of doing the "Mirror Left <--> Right" command in MilkShape.

2. Be sure to keep the outer edges of your model within a boundary of -127 to 128 MilkShape units in each direction. Although the Deus Ex format supports a much higher mesh resolution, the Unreal format does not, so you'll have to stick with those same restrictions. My converter does display the maximum and minimum values of x, y, and z in your mesh, so if you see values approaching the high 120's, you'll want to scale your model down a bit in MilkShape 3D. If part of your model goes beyond 128, you'll start seeing scrambled polygons at the edge.

Steve Tack
stack@planetdeusex.com


3D Studio to Deus Ex mesh converter

Download it here:
3D Studio to Deus Ex mesh converter, version 1.0 (65 K)

Description

The 3D Studio to Deus Ex mesh converter ("3ds2de") is a modification of the "3ds2unr" utility, originally written to convert 3D Studio models (meshes) into the Unreal format. In case you weren't aware, Deus Ex uses a slightly different mesh format than Unreal/UT. The reason for this is to support higher "mesh resolution" which allows finer detail to be modeled in the game's meshes. As a result, if you attempt to import a mesh into Deus Ex that is in the current Unreal/UT format, you'll get a random, jumbled mess. Convert it with 3ds2de, however, and you're good to go. The 3ds2de utility allows you to take full advantage of the higher mesh detail that Deus Ex uses.

Instructions

Importing models into Deus Ex with 3ds2de
(this document is included with the .zip file)

Steve Tack
stack@planetdeusex.com


Tack's Deus Ex Mesh Tool

Download the latest in-progress version here:
Tack's Deus Ex Mesh Tool, version 0.02 (169 K)

IMPORTANT: If you are "bug-intolerant", avoid downloading this. There are known bugs and limitations with this version - if this was a commercial product, it would be considered pre-Alpha. When this program gets to the point where the major bugs are fixed and the rest of the functionality is finished, I will start calling it version 1.0, etc.

Description

Tack's Deus Ex Mesh Tool is a stand-alone Windows utility for extracting and converting Deus Ex meshes.

The Mesh Extractor allows you to to export meshes from the game into MilkShape 3D and Lightwave 6.5 formats. It is similar to the mesh extractor in the WOTgreal utility (which as of this writing you can find here: WOTgreal), with a few differences:

* Native MilkShape support. Why is that important? MilkShape's Unreal importer does not handle multiple surfaces and materials. As a result the UV mapping does not get imported when you import a pair of Unreal format .3d files. Since my mesh tool supports the .ms3d format directly, the issue is bypassed, and you get all of your surfaces and UV mapping.
* Native Lightwave 6.5 support. Why is that important? Because I use Lightwave! And I ran into similar issues that I did with MilkShape (UV texturing, etc).
* Animation frame support. Exporting animation from Deus Ex is tricky business, since it is stored as a series of point positions. This really limits what you can do. While WOTgreal does export animation in the .3d files, there isn't really a way to make changes to them. I added a brute force method of supporting animation - the mesh extractor can create a file for each animation frame. This isn't great, but it's better than nothing. It's also the way I plan on supporting conversion of meshes back to .3d format for importing into Deus Ex.
* Automatic texture extraction. Just leave the "Export Mesh Textures" checkbox checked, and all of the required .PCX files will be exported when the mesh is exported. If a generic character mesh is selected, a list of all characters that use that mesh will be displayed and the chosen character's textures will be exported.

The Mesh Converter will allow you to convert directly from Lightwave 6.5 to Deus Ex formatted .3d files, and may include MilkShape support as well. I'm currently writing that part of the utility.

Current Status

Status Updates

Screen Shots

MilkShape/Lightwave screen shots of extracted models

Instructions

There is no installation program to run. Just copy the .EXE file somewhere and make an icon for it.

The Mesh Extractor is pretty straightforward. Use the Open button to select a Deus Ex package. These are in your \DeusEx\System folder. The following packages have meshes in them:

DeusExCharacters.u
DeusExDeco.u
DeusExItems.u
MPCharacters.u (if you have the multi-player patch installed)

You'll want to create an output folder to hold your exported files. Select that with the Select button.

You can export multiple meshes at once. Hold the Ctrl button down to select individual meshes. To select a range of meshes, select the first one, hold the Shift button down, and select the last one. To select all meshes, press the Select All button. Be careful when exporting multiple meshes and using the animation options. You could end up with a huge number of files.

MilkShape 3D Notes

When you first fire up MilkShape 3D, the OpenGL preview window will be set to "Smooth Shaded". Right-click in the OpenGL window and select "Textured" or it will look weird.

Currently, there doesn't seem to be a way to set the "special" polygons within MilkShape. Until the Mesh Converter part of this utility is complete, you might want to head over to the polycount Unreal tools section: http://www.planetquake.com/polycount/resources/unreal/tools.shtml and check out UnrealFX. It lets you set the special polygons, such as translucent, unlit, masked, weapon, and so on.

Lightwave Notes

Only Lightwave 6.5 format is supported. That's because the type of UV mapping I'm using was introduced in veresion 6.5. If you try to load an exported .lwo file into Lightwave 6, it may work somewhat, but the UV texturing will not show up. Versions of Lightwave prior to 6.0 will definitely not work.

In Modeler, set your Content Directory to point to your extraction output directory. The references to the .PCX texture files in the .LWO files will not include any path information, so if you don't set your content directory, you'll get those annoying windows asking you to locate the textures.

Known bugs and limitations

* The main nasty bug happens when you close the mesh extractor window. It crashes the program. This happens quite often. It doesn't appear to be a memory leak or anything, just some sort of unhandled exception somewhere, so you shouldn't have to reboot or anything - just pull it back up.
* The OpenGL shading in the MilkShape export is not too functional yet. For now, all surfaces will be set to 100% emissive, which will make untextured surfaces look weird. I'm hoping to fix this eventually.
* There isn't any support just yet for "special" polygons, such as unlit, translucent, masked, etc, but it's coming.
* For technical reasons, the following meshes cannot be exported: Fly (in DeusExCharacters.u), EidosLogo, IonStormLogo, DXText, and DXLogo (in DeusExDeco.u). They won't show up in the mesh list, so you probably wouldn't have even noticed it. :)

Steve Tack
stack@planetdeusex.com


A word about Deus Ex Mesh Resolution

In case you were wondering why Deus Ex has a different model format than the normal Unreal/UT, it's because it supports a higher "mesh resolution". That's not so important when dealing with weapons or a pack of cigarettes, but it may be something you care about when you want to have finer facial detail. Here's what I mean:

Here's the GM_Trench mesh (the one used for JC, among others) exported to the "old" Unreal format. (with WOTgreal 2.013) I've hidden the glasses polygons so you can see the facial detail:

Now here's the same mesh exported to the "full mesh resolution" Deus Ex format (with my in-progress extractor):

Pretty hard to tell the difference, huh? Yeah, me too. Once the textures are applied, I doubt many people would notice. So the difference may not be critical, depending on what you're doing. One thing that could end up being an issue is lip synching. Since you need to be fairly precise with that, you may actually need the full mesh resolution that the Deus Ex format provides.

Here's a shot with both meshes super-imposed. Pretty darn close:

In case you were wondering, the white lines represent the "low res" version and the black lines represent the "full res" version.

Steve Tack
stack@planetdeusex.com


Getting started with the Deus Ex SDK

Prerequisites:
None!

Overview:
The Deus Ex SDK was released on September 22, 2000 as a free download. It allows you to make your own missions for Deus Ex, one of the best single-player games of 2000 (if not *the* best game of 2000). Since Deus Ex uses a modified version of the Unreal engine, some of the tools used for making an Unreal or Unreal Tournament map are the same, namely UnrealEd. It's the program that you use to build a three-dimensional world and populate it with characters and items. While UnrealEd is a pretty nice program, making levels for a 3D game isn't necessarily for the faint of heart. Once you get familiar with the tools, it's not all that difficult, but expect a considerable learning curve. Hopefully this site will help. The other main component of the Deus Ex SDK is called ConEdit. It's the conversation editor for setting up dialogue with characters in the game, among other things.

To get started using the Deus Ex SDK:

1. Download the SDK

Get it at one of these locations:

http://www.deusex.com/sdk.htm
http://www.eidosinteractive.com/downloads/search.html?gmid=50 (go to the Other Media section)

2. Make sure the Deus Ex game is properly installed and install the SDK

This may not strictly be necessary, but I would recommend installing the Deus Ex game in C:\DeusEx. I would also recommend finishing the game before using the SDK. You'll be more familiar with the possibilities and what's already been done. Go ahead and install the SDK.

3. Review the documentation

You should at least be familiar with WHERE the included documentation is and what each document is for. In your C:\DeusEx\docs folder are four documents:

ConEditDocumentation.doc | This is the doc for ConEdit, the conversation editor. This is actually one of the better docs, as it explains how to use it in English.
DeusExSDK.doc | Mostly an overview of the docs, it does contain some info on building your own classes (important if you want to build your own conversations or custom items like textures or meshes)
EditorDocumentation.doc | This is a large doc that describes in detail all of the Deus Ex specific things you can do. It's not going to tell you how to build a level or even how to use UnrealEd. However, it is full of great information on adding all sorts of things, such as keypads, e-mail messages, ladders, and doors that can be locked, unlocked, picked, or blown up.
MusicDocumentation.doc | This is a short doc on using music in your maps. The cool thing about "tracker" style music and Deus Ex is that you can set it up to change depending on what's happening in the game.

4. Make a very basic map

Fire up UnrealEd (labeled Deus Ex Editor in the Start menu). If you want to know what all of the unlabeled buttons to the left are, see my UnrealEd Reference Guide. For some instant gratification, continue on. If you're more of the "I'd like to learn UnrealEd systematically", go ahead and skip to Wolf's Basic Tutorial at his site. You'll want to go through his tutorial after this anyway, but it is fairly meaty and if you're like me, you just want a quick sample before diving in fully.

Click on the Build a Cube button: . Right-click it and enter 256 for the Height, Width, and Breadth. Hit Build. Not much should happen yet, but you should see a red cube in the 2D and 3D windows. To zoom in and and out of the 2D windows, hold BOTH mouse buttons down and move your mouse up and down. To pan around, hold the left button down and move your mouse around.

Now click on the Subtract Brush from World button: . It's the second button down in the third column. This will essentially carve out a hole which will act as a single room where we can start the player and place objects into.

Now place a PlayerStart item. This is where the player will, uh, start. Go to the drop-down on the upper right of the screen and select Classes. Now expand the NavigationPoint item and click on PlayerStart. Right-click in one of the 2D windows somewhere inside your room and select Add PlayerStart here. Move it around if you need to by pressing Ctrl and left-click and moving the mouse around.

We'll also need to place a light to be able to see anything. Right-click somewhere in your room and select Add Light here. Move it around if you want with Ctrl and left-click.

Press F8 and then Rebuild Geometry. Then hit Close.

Save your level by selecting "Save level" from the File menu.

Make sure your Deus Ex CD is in your CD-ROM drive and select "Play level."

If everything worked, you should be running around in a boring, ugly, one-room level. If it didn't work for any reason, don't worry about it, this isn't a very detailed tutorial.

Now go on and do Wolf's Basic Tutorial. It's a great way to get started.


UnrealEd Reference Guide

The Toolbar:

Navigating the 2D views:

Mouse buttons | Directions | Button to hold down | Action
 |  |  | Pan
 |  |  | Zoom In/Out
 |  |  | Bring up right-click menu
 |  | A | Place a new Actor
 |  | L | Place a new Light
 |  | Ctrl | Move item without panning (or selection brush if no items are selected)
 |  | Shift | Move item with panning (or selection brush if no items are selected)
 |  | Ctrl | Rotate item without panning (or selection brush if no items are selected)
 |  | Shift | Rotate item with panning (or selection brush if no items are selected)
 |  | Ctrl | When Scale Brush button is active, will resize the current brush
 |  | Ctrl | When Stretch Brush button is active, will size current brush along one axis
 |  | Ctrl | When Stretch Brush button is active, will size current brush along a different axis
 |  | Alt | Move pivot point of selected brush (or selection brush if nothing selected). Also, if a brush vertex has been selected, this will move that vertex.

Navigating the 3D view:

Mouse buttons | Directions | Button to hold down | Action
 |  |  | Move camera forward/backward
 |  |  | Rotate camera left/right
 |  |  | Rotate camera left/right and up/down
 |  |  | Move camera left/right and up/down
 |  |  | Select surface
 |  |  | Pull up surface menu and select surface
 |  | Alt | Make surface under cursor the current surface
 |  | Shift | Move brush along X-axis
 |  | Shift | Move brush along Z-axis
 |  | Shift | Move brush along Y-axis

TIP: If you hold down ALT while right-clicking on a surface in the 3D view, the current texture will change to whatever that surface's texture is. So if you then right-click on the selected surface, the texture of that surface will show up in the last menu item ("Apply Texture XXX"). This is a way to determine what texture has been applied to a brush surface on an existing map.

TIP: If UnrealEd comes up fine some of the time, but sometimes you get blackness in all four editing windows, try selecting "Reset All" from the Camera menu.


UnrealEd terminology

Prerequisites:
None!

Overview:
It's important to know a few UnrealEd terms that will be used a lot on this site.

Brush: A 2D or 3D shape that helps define the geometry of a level. By "geometry", I mean things like the walls, hallways, stairs, and doors of a map. Basically, anything you can run into or climb on, but can't move, talk to, or pick up. The exception is the selection brush, which is not part of a map. In UnrealEd, each of the brush types shows up as a different color. This illustration at Wolf's Unreal shows what they all are; there are six types.

Selection Brush: Also known as the Builder Brush. This is used to define a 2D or 3D area of your map that will become a brush when you press one of the brush buttons, such as Subtract Brush From World or Add Movable Brush. It's kind of like a 3D cursor. Sort of. It can be any shape - even a 2D sheet. There are a number of buttons that will change it's shape, such as a sphere or a staircase, but you'll use the cube shape a lot. The selection brush shows up red in UnrealEd.

Addition Brush: Adds solid geometry to the map. Since you start out with an infinitely solid mass when you start a new map, you won't use this until you've subtracted something first. So you might use a subtraction brush to make a room, then add some stairs with an addition brush. These types of brushes show up blue.

Subtraction Brush: Removes geometry from the map. It's the one you'll use to make rooms, hallways, window openings, and doorways. It shows up yellow.

Mover Brush: Also known as a movable brush or moving brush. This one is used to make doors, windows, breakable walls, and all sorts of "moving" things. It can have up to 8 key frames to define different positions. These are purple.

Semi-Solid Brush: A special type of brush that we won't go into detail here. They show up pink. (this says "pink" in case you couldn't read it!) This is one type of brush that can be created with the Add Special Brush button.

Non-Solid Brush: Another special type of brush added with the Add Special Brush button. Water surfaces and zone portals are two examples. These appear as green brushes.

The 3D view: The window that is by default in the lower left corner of the screen is the 3D view.

The 2D views: The other three windows are the 2D views.

Texture: In UnrealEd, textures are nothing more than bitmaps. The most common use is to assign them to surfaces in your map.

Surface: When in the 3D view, you can left-click on a surface and it will be highlighted. You can then select a texture from the browser or right-click on it to change properties or alignment.

Mesh: A 3D model. You can change which mesh a particular item will use, but usually you don't. Fancier levels will include custom meshes so that completely new items and characters can be added to the game. The Deus Ex developers created their meshes by using a combination of software: Lightwave (for modeling) and UView (for texturing). The combined retail cost of these would be about $3000. If you happen to have both of these (or $3000 burning a hole in your pocket), you can use a utility included in the Deus Ex SDK to import your own models (meshes) into UnrealEd.


Placing items into your map

Prerequisites:
Navigating UnrealEd
 Wolf's Basic Tutorial

Overview:
At this point you should already be familiar with placing items into your maps, but I thought I'd go into a bit more detail about some of the Deus Ex items you can add. This will cover adding pickups and non-geometry (non-brush) items.

1. Select the type of item from the Class browser

To place items in your map, make sure "Classes" is selected in the Browse drop-down on the right side of the UnrealEd window. You'll want to keep "Only show Actor classes" checked, since that's all you care about.

Some of the most common types of items you'll add are under:

Actor -> Decoration -> DeusExDecoration
Miscellaneous Items

Actor -> Decoration -> DeusExDecoration -> Containers
Breakable crates, boxes

Actor -> Decoration -> DeusExDecoration -> ElectronicDevices
ATM's, vending machines

Actor -> Decoration -> DeusExDecoration -> ElectronicDevices -> Computers
Personal computers, public computers, security computers

Actor -> Decoration -> DeusExDecoration -> ElectronicDevices -> HackableDevices
Security cameras, alarm units, control panels, keypads

Actor -> Decoration -> DeusExDecoration -> InformationDevices
Books, DataCubes, newspapers

Actor -> Info
DeusExLevelInfo (important if you use conversations!)

Actor -> Info -> ZoneInfo
ZoneInfo items, SkyZoneInfo, WarpZoneInfo

Actor -> Inventory
All the "pick-ups" in the game: weapons, ammo, multitools, lockpicks, medkits, NanoKeys, etc.

Actor -> Keypoint
There are several items in here that can be useful, but most are a little more advanced. A couple of the more useful things here are the AmbientSound and InterpolationPoint items.

Actor -> Light
Regular lights and spotlights

Actor -> NavigationPoint
The one you're already familiar with is PlayerStart, but there are lots of other interesting ones too

Actor -> Pawn -> ScriptedPawn
All of the non-player characters (NPC's), including humans, robots, and animals

Actor -> Triggers
A huge number of important things are in here

2. Add it, position it, rotate it

There are two basic ways to add an item after selecting it in the class browser. Either right-click in your map and select "Add XXX here" or hold the "A" key down and left-click. See the UnrealEd Reference for information on how to move and rotate the item into position.

3. Set the item's properties

Something you'll do constantly when adding stuff to a map, is change the properties of items. To pull up the Properties window for a single item, you can either right-click it and select "XXX Properties" or you can just double-click on it. To select multiple items, hold the CTRL key down while left-clicking on them. If you select a group of the same type of item, you can then right-click on one of them to set all of their properties at once. That way, you could adjust a whole group of lights, for instance.

That about does it. I don't have a specific tutorial here, so just play around with adding pick-ups and characters to some maps and adjusting their properties.


General Guidelines

Prerequisites:
The Basics

Overview:
When constructing Deus Ex maps, there are a few guidelines that you may want to follow. These are things that SEEM to make sense to me.

1. Study the maps from the real game, and steal from them

Though some of the Deus Ex maps from the game are pretty large and can be tricky to decode, examining what the pros did is really the best way to learn about making good maps. In case you didn't realize it, all of the maps from the game can be loaded into UnrealEd. When you are in the Load map dialog box, change the File Type to "All Files". All of the files that start with a number and end with ".dx" are the Deus Ex maps that you should be familiar with if you've played the game.

You can also copy brushes from existing maps and paste them into your own. It can be a little tricky - if you copy only a subtract brush from a map and paste it into open space in your map, that's not going to do any good. Just select the brushes you want to copy in the "from" map (to multiple select, hold down the CTRL key), and select Copy from the Edit menu. Then go to your "to" map and select Paste. You can even pull up two copies of UnrealEd at the same time to make this easier.

So if you want a pool table in your map, grab it from the NYC bar map. Need a 747? Grab it. It can also be handy to grab more mundane things like doors, if only to have textures already assigned.

2. Use the grid for placing brushes

If you follow #1 above, you'll notice that most of the brushes in the real maps are aligned with the 16 unit grid. You'll probably want to at least use the 1 unit grid when placing brushes. For non-brush items that you add, this isn't important; the grid isn't used when placing items like characters, decorations, and pickups. Smart use of the grid to align your brushes just seems to make everything go smoother. Lining up doors with doorways becomes a breeze, and creating hallways that perfectly line up with rooms becomes the rule instead of the exception. The scaling and tiling of textures will be much easier too.

3. Make sure multiple solutions are available

The beauty of Deus Ex is the flexibility that the player has in completing mission goals. Don't try to force the player down a particular path or think too much in terms of "puzzles." Try to give the player as many options as you can. Remember to provide lots of ventilation shafts for sneaking around, provide areas accessible only by water, allow keypad codes and passwords to be discovered by talking to NPC's or finding DataCubes, make sure a reasonable number of multitools and lockpicks can be found, as well as weapons, ammo, and explosives, with a reasonable amount of effort.

4. Reward exploration

A good map done in the flavor of the game will have many hard to reach areas that contain goodies. Remember to award exploration bonuses, weapon upgrades, augmentation canisters, multitools, lockpicks, bioelectric cells, medkits, and crates filled with goodies to players that take the time to poke around the more out of the way places.

5. Always make goals clear and keep them coming

Another thing I appreciated about Deus Ex is the fact that the current goals were always clear. Also, it always seemed that another one was just around the corner. So try to make the goals that you give to the player as straightforward as you can. Go ahead and make a complex, convoluted plot, but give the player a direction for the next task at hand. Give the player a lot of small goals too. While there may be a larger, overall goal that isn't completed until the map or mission is done, smaller goals give the player a sense of progression. If the player is earning a small number of skill points for each completed goal, but there are a lot of them, it can help keep the interest level up. (or the addiction level up, if it's really a good map!)

6. Don't constrain the player to one physical path

Many typical 3D shooters force a player down a particular hallway or only allow for a few branches. But you aren't making a 3D shooter are you? Strive for more variety. Make a number of standalone buildings with multiple doorways or other access points. Think in terms of real buildings or locations. A real building might have roof access, basement access, elevator shafts, ventilation shafts, breakable walls, and multiple doorways.

7. Vary your textures, but be consistent

You will rarely want to use the same texture for a wall and a floor in the same room, but you may want to use a similar wall texture throughout a particular building. There are a LOT of existing textures to choose from, so try to break things up visually. But don't just go from a metal room to a stone walled room to tiles. Think in terms of what type of building or area you're in and try for a specific theme. Luckily, many of the existing textures are grouped by theme, so that helps.

8. Just because you CAN do something, doesn't mean you SHOULD

Just because you figured out how to make the assault shotgun into a watermelon launcher, doesn't mean in belongs in your map. In my opinion, the mechanics of the game are fine as is and don't need a whole lot of tweaking. I'd rather play a map that concentrated on balanced gameplay and interesting characters and story than one that featured an exotic new weapon and little else. That said, if it's a good map AND it happens to have some interesting mods that add to the experience, nobody's going to complain!

9. Miscellaneous

Many of the doors in Deus Ex are either 144 units high and 72 units wide or 128 x 64 units and between 1 and 8 units thick. It can be convenient to go with 128 x 64 doors, since most door textures are 256 x 128 - which means a scaling factor of 0.5 will give a perfect fit. For doors of other sizes, you'll probably need a calculator to figure out the right scaling factor. :) (for instance, a 256 x 128 texture on a 144 x 72 door would need a scaling factor of 0.5625 - that is, 144 / 256 for the height, and 72 / 128 for the width)

Stairs tend to be 16 units high and either 16, 24, or 32 units deep.

Generally, you'll want to put things like keypads, control panels, alarm panels, and light switches about 4 grid squares above the ground (for a grid set to 16 units).


Intro to making multi-player maps

Prerequisites:
The Basics
The latest SDK version
 The Multi-player Deus Ex patch

Overview:
If you're just starting out and want to make multi-player (MP) Deus Ex maps, you might just need the basics to get pointed in the right direction. For now, this will just be a very basic tutorial, as I don't really do MP stuff. Before you go on, download and install both the latest Deus Ex SDK *and* the multi-player patch at the above links if you haven't already.

NOTE: Multi-player is not my area of expertise, so if you notice any errors or have any suggestions on other information to include here, please let me know.

Download:
Download example MP map (24K)

1. Place PlayerStart items for spawn points

Fire up UnrealEd and create some level geometry just like you would for a single player map. But this time be sure to place *multiple* PlayerStart items. These will be the positions where the different players will start. So add up to 16 PlayerStart items at various locations in your map. If you only want to support three players, then you'll only need three PlayerStart's. Placing them near a weapons rack might be a good idea.

Be sure to save your map with a .dx extension.

2. Place DeusExLevelInfo (optional?)

I usually place a DeusExLevelInfo item in each map I make (out of habit from doing single player maps). I don't know if this is strictly necessary or even desirable, but my little test map has its DeusExLevelInfo -> bMultiPlayerMap property set to True. It seems to work OK, so I guess that's right. :)

3. Place other MP-specific items

One item that you can put in a MP map is the ammo crate. It's available under Decoration -> DeusExDecoration -> Containers and it's called simply ammocrate. Players will be able to replenish their ammo supply by right-clicking on it.

It's also common to have a number of weapons racks so that a newly spawned player can select which weapons they want to carry. You can either copy an entire weapons rack from an existing map (like DXMP_Area51Bunker.dx or whatever) by using the method described here or you can build your own. To place a weapon so that it doesn't fall to the ground, put it in your map and set its Movement -> Physics property to PHYS_None.

NOTE: If you're wondering how to place weapons so that they don't disappear after a player right-clicks on them, that behavior is automatic when your map is started as a MP map. Some items disappear and then re-spawn after a while (such as the LAM).

Look at the existing MP maps for examples of other types of items to add, such as RepairBots, MedBots, keypads, etc.

Note that many things available in single player maps are *not* available in MP. You cannot set up goals or conversations, for example.

3. Edit your DeusEx.ini file

Unlike single-player mods, the multi-player patch added a sort of crude "mod loader" which allows custom MP maps to be launched from the game. It's a little messy, but not too bad. The players of your MP map will need to do this as well.

Pull up your DeusEx.ini file in your \DeusEx\System folder and in the [DeusEx.dxmaplist] section, add entries for your custom MP map. After an available Maps[x]= statement, add the name of your map's filename, but without the .dx extension. After the corresponding MapSizes[x]= statement, put in the minimum and maximum number of players your map is designed for in parenthesis.

Here's an example of what you might add for the little tutorial MP map:

Maps[5]=MP_tutorial

(or use the number for whatever your next free space is)

And for the number of players supported:

MapSizes[5]=(2-3)

4. Frag your friends

To play your map, fire up Deus Ex, hit the Multiplayer button and host a LAN or Internet game. You should see your custom mod in the list. Fire it up and rip 'em a new one.


How to add a Deus Ex style door

Prerequisites:
Everything under The Basics

Overview:
In UnrealEd, you create a "mover brush" to get a door to work. Deus Ex includes an extension to the basic mover (called DeusExMover, oddly enough) that allows you to set up cool stuff like locking/unlocking, lockpick strength, the ability to blow it up, and Nanokeys, among other things. In my opinion, this is one of the most difficult things to do when you're first starting out, so be patient. In this lesson, I'm assuming you know how to create rooms and doorways and how to assign textures to surfaces. If you're at all fuzzy on any of these, please do all of the items under "The Basics" before doing this lesson.

1. Create basic brush

It's important to know what a "brush" is and the difference between the different types. An excellent way to jump-start your knowledge is this illustration from Wolf's Basic Tutorial of the various types of brushes and what color they appear as in UnrealEd. Basically, the first step is to shape the red selector brush into the shape of your door. A typical door in Deus Ex will be about 128 x 64 x 4. If you have your grid units set to 16, that corresponds to 4 squares wide and 8 high (and a fraction of a square deep). Once you have your brush shape defined, move the red selector brush into an empty part of the map. It's important that it not overlap any existing geometry. Hit the "Add brush to world" button: (first button in the third column).

IMPORTANT: Do NOT use the scaling tools when making the initial brush. If you do, all sorts of weird things can happen. Though it's a pain, for best results, type in the size values in the selection brush's properties instead.

2. Texture the basic brush

You will now want to set up the textures for your door. Some good places to start would be the Wood category under the NewYorkCity texture library or the Metal category under Area51 Textures. IMPORTANT: you will NOT be able to change your texture settings once the door is created, so be sure to get it the way to want it. If you don't know how to assign textures to surfaces, you really should go back to the main page and do everything under "The Basics" category first.

3. Create a DeusExMover brush

The next step will be to make the basic "Addition" brush into a mover brush - you'll actually be creating a new brush based on the brush you've already added. To make 100% sure that the selection brush is correct, size the red selection brush so that it is a bit bigger than the brush you just added. Be sure to check all 3 2D windows. Hit the intersect button: (third button down in the third column) and the selection brush will be perfectly sized to your door brush. In a normal Unreal map, you would just hit the Create Mover button at this point, but for a Deus Ex mover there is an extra step. Make sure Classes is selected in the Browse drop-down and expand the following items: Actor, Brush, and Mover. Select DeusExMover. Now go ahead and press the Create Mover button: (sixth button down in the third column).

At this point, you will actually have THREE brushes in the same place: the red selection brush, the blue "Addition" brush, and a purple "Mover" brush. Move the red selection brush out of the way, and click on the purple brush to select it. Move it somewhere, and you'll notice that your original brush is still there. De-select the mover brush and select the blue brush. Delete it (either hit the Delete key on the keyboard or right-click and select Delete). Now hit F8 and Rebuild Geometry to get rid of your original brush in the 3D view.

The purple brush that is now in your map will only show up as an empty wireframe. However, it will show up fine when playing the level.

Notice in this example from an actual Deus Ex map how the door appears hollow in UnrealEd. During the game, though, there will be a functioning door there.

NOTE: For some brush tips on stuff like properly placing the pivot point and scaling, see the Brush Tips page.

4. Move the door into position

A mover brush can be moved around at any time, so it is not critical that it be moved into the exact final position yet. Mover brushes are very flexible, so we can make a swinging door, a door that slides from the top/bottom/left/right, an iris-type door - just about anything you want. For this tutorial, let's make a traditional swinging door. I won't go into the basics of creating rooms and doorways here - you should be familiar with that before going on. If you want, move the door into a doorway that you have already created in your map. However, I would recommend that for now you just leave it floating in the air somewhere, but not too far off the ground.

The red arrow that you see coming out of the mover brush indicates the "direction" of the door. That is only important if you want to make it so that the door can only be opened from one side. The direction of the arrow indicates the only side you would be able to open it from if its bOneWay property was set to True. We'll talk about DeusExMover properties more at the end of this lesson.

5. Set up the door's animation

To actually get a door to move, you will need to set what position the door is closed, and what position it's in open. Typically, the closed position is the "base" or "Key 0" and the open position is "Key 1". Note that you can set up a door to initially be open in your map.

When you created your DeusExMover brush, you also set the position of all eight "key frames." These key frames define what positions your mover brush can be in. For fancier movers, you may end up using more then two key frames, but for doors, you'll usually want to stick with two. Make sure your door is selected (bright purple instead of dark purple) and right-click it. Right-clicking will also select it, so you may want to practice pulling up the right-click menu and selecting in one step. Select Mover Keyframe and then Key 1. You can now move your door into its open position.

Since you're making a swinging door, rotate your mover brush 90 degrees in the Top 2D view by holding down CTRL and right-click and moving the mouse left or right. You may also need to move the door into the correct position, depending on where the pivot point on your DeusExMover brush ended up. There are some techniques for setting up precisely where a pivot point will be created on a mover, but let's not worry about that for now. The one thing you DON'T want to do is move the pivot point after the DeusExMover brush is created. That will mess up your texture scaling.

Compare this example to the previous one. This is showing the same mover brush, but at Key 1. Notice how it has been rotated 90 degrees; this is the door's open position.

If you'd like the door to initially be closed, right-click on it and re-select Key 0.

NOTE: If you'd like your DeusExMover to go through more than two keyframes, you can also set up keys 2 and up. For that to work, you'll need to increate the Mover -> NumKeys value from 2 to the number of keys you are using.

6. Set up the door's properties

Now that the hard part is done (trust me!), we need to set this up so that it acts like a door in Deus Ex. The DeusExMover brush can be used for more than doors (breakable glass and elevators are both subclasses); see EditorDocumentation.doc for more information. We want to create a door, though, so right-click your mover brush and select DeusExMover Properties. Expand the DeusExMover category and set bIsDoor to True.

If you want the door to initially be locked, set bLocked to True. (easy one, eh?)

To make the door accessible from only one direction, set bOneWay to True. The player will only be able to open the door from the direction of the arrow.

To set the lock strength, set lockStrength to a value. "0.1" would mean 10% lock strength. (a player untrained in lockpicking would require one lockpick to unlock a 10% lock strength door) If you don't want the player to be able to pick the door's lock at all, set bPickable to False.

To set the door's resistance to being blown up, assign a number to the doorStrength value. "0.25" means 25%. Depending on the value, the player might be able to destroy the door with a crowbar, a LAM, a GEP gun, or LAW for instance. If you don't want the player to be able to blow up your door, set bBreakable to False.

If you would like your door to close without stopping just because the player is in the way (a common setting in the game), expand the Mover item and change MoverEncroachType from ME_StopWhenEncroach to ME_IgnoreWhenEncroach.

You can also set your door up so that it can be unlocked with a key. (novel idea, huh?) First, add a NanoKey item to your map. In the class browser, expand the Inventory, Pickup, and DeusExPickup, and select NanoKey. Add the NanoKey to your map, and assign it a KeyID in its NanoKey properties. (you'll also want to set the Description under Inventory properties, since the player will see this when they pick up the NanoKey) As you might guess, you then just need need to assign the same KeyID value to your door's KeyIDNeeded value. Now, if the player has that key, and they use their nano-keyring on the door, they will be able to unlock it.

Another option is the ability to unlock/lock/open/close your door from a security console (computer). Assign your door a Tag value in its Events property and use this value in one of the doorTag values of a security console. See How to add a security console for details.

There are even more options for how to use doors, so experiment. Have fun!

Extra notes:
You may actually want to use "regular" Unreal movers in your maps sometimes for doing things other than doors. For more information, see Wolf's Movers tutorials at Wolf's Unreal.


How to add a nanokey

Prerequisites:
Adding a Deus Ex style door

Overview:
This will show you how to set up a nanokey so that it can unlock a particular door. If you've followed the Adding a Deus Ex door tutorial, you probably already know how to do this, but I'll cover it quickly again.

1. Set the Key ID of the door

If you don't already have a DeusExMover brush that is set up to be a door, you'll need to add it. Right-click on the door brush and select Properties. Set the KeyIDNeeded value (under DeusExMover) to something meaningful. Remember to set bLocked to TRUE, or your key isn't going to mean much!

2. Place and set up the nanokey

Now place the nanokey in your map. It's under Inventory -> Pickup -> DeusExPickup. Right-click on it and select its properties. Set the KeyID to the value that you set the KeyIDNeeded to above.

You can also select the appearance of the nanokey by setting the SkinColor property:

SC_Level1
SC_Level2
SC_Level3
SC_Level4

Your key will always show up in UnrealEd as the blue Level 1 key, but in the game it will display correctly.

You'll also want to give the key a description that the player sees. Expand your nanokey's Inventory properties and fill in the Description value with something appropriate:

If you don't do this, the player will see "NO KEY DESCRIPTION - REPORT THIS AS A BUG!" in the inventory screen.

That's it!

Adding a Nanokey to an NPC's inventory
(using the PickupDistributor)

Overview:
You can also add a specific nanokey to a character's inventory instead of adding it directly to a map. If the player kills or stuns the NPC, he or she will be able to get the key from the NPC's body.

2b. Add PickupDistributor

You'll still need to follow Step 1 above, but instead of adding a nanokey and changing its properties, you can add a PickupDistributor. Each PickupDistributor can add up to 8 nanokeys to NPC's.

Under Actor -> Keypoint, select PickupDistributor, and add one to your map. It doesn't matter where you add it, but you might want to put it near your DeusExLevelInfo and/or PlayerStart to make it easier to find.

Pull up its properties and expand PickupDistributor -> NanoKeyData -> [0]. Fill in the Description, KeyID, and SkinColor values, just like you would in Step 2 above. You'll also need to fill in the ScriptedPawnTag to identify which character should get the key. If you have multiple characters with the same Events -> Tag value, you'll need to change the specific character's Tag value to something unique.

If you have more keys to give to more NPC's (or the same NPC for that matter), you can fill in more values. If for some reason you have more than 8 keys to distribute, you can add additional PickupDistributor items.


How to add a keypad

Prerequisites:
How to add a Deus Ex style door

Summary:
The security keypad is one of the more common things you run into in Deus Ex, so you'll undoubtedly want some in your maps.

Download example map (52K), Provided by Vu Ngoc Toan

1. Place the keypad

First, you'll need to add the keypad into your map. Make sure "Classes" is selected in the Browse drop-down, and expand the following items: Decoration, DeusExDecoration, ElectronicDevices, HackableDevices, and Keypad. Now select either Keypad1, Keypad2, or Keypad3. All three types work exactly the same, but they will look different in the game:

Keypad1
Keypad2
Keypad3

Move the cursor into one of the 2D views and right-click where you want the keypad to go. Select it and rotate/move it to where you want it. A good rule of thumb is to place it around 60 to 80 units above the floor. That translates to 4-5 grid squares if you have the grid size set to 16. Of course, you can get as creative as you want, as long as the keypad is accessible.

2. Assign a code to your keypad

Normally you will assign a 4 or 5 digit number to the keypad that is the code for unlocking or deactivating whatever object it's attached to. You can also use the "#" and "*" keys, but that would go against the normal Deus Ex convention. Make sure the keypad object in your map is selected, right-click it, and select Properties. Expand the Keypad item, and enter the code you want to assign in the validCode field. If you want the door to unlock and open when the user has entered the correct code or hacked the keypad, set the bToggleLock to False, otherwise leave it True and the door will only unlock.

3. Set up how "hackable" your keypad is

If you don't want the player to be able to hack your keypad with multi-tools, go into the HackableDevices property and set bHackable to False. Usually this will be set to True, unless it opens up something really special that you want to save for later. If you want to allow you keypad to be hacked, set the "strength" (how many multi-tools is takes to bypass your keypad), by using the hackStrength value. A value of 0.2 will set it to 20%. So, for example, a player who has not upgraded their electronics skills will need two multi-tools to hack a 20% strength keypad.

4. Attach your keypad to a door (or other object)

Now for the fun part. You can use a keypad to do a variety of things, but here we'll just set it up for its most common use - unlocking a door. Since regular Unreal movers do not have a "locked" property, you will need to attach your keypad to a DeusExMover. For more information, see How to add a Deus Ex style door. The DeusExMover in your map must have bIsDoor set to True and you'll normally want to set bLocked to True. (otherwise, what's the point of the keypad, right?) I would also set bHighlight to True.

Select the DeusExMover object in your map that is the door you want to associate with your new keypad. Right-click to get to its properties and expand the Events item. Fill in the Tag value with something, such as Door1. Remember this name, write it down, or copy it into the Windows clipboard with Ctrl-C.

Now go back to your keypad and pull up its properties. Expand its Events item and put the name you gave your door into the Event field. You should now see a red line connecting the keypad to your door. If you don't, you did something wrong.

Rebuild your geometry with F8, save your level, and give it a try.

There are uses for a keypad other than unlocking a door, so experiment!


How to add breakable crates

Prerequisites:
The Basics

Overview:
This is so easy, it's kind of silly to even mention, but those breakable crates are so common in the game, I'd thought I'd cover it quickly.

1. Add the crate

Under Decoration -> DeusExDecoration -> Containers, select one of the items starting with CrateBreakable. These are the choices and default contents:

CrateBreakableMedCombat | Defaults to 10mm ammo
CrateBreakableMedGeneral | Defaults to lockpick
CreateBreakableMedMedical | Defaults to MedKit

Just place the item in your map. If you like the default values, you're done!

2. Set it up

To customize what's inside, select the crate and pull up its properties. To change the contents, expand the Decoration category and put something different in the "contents" value. The easiest way to do that is by selecting the Inventory item from the Class browser and hitting the Use button. You generally want to stick with items in the DeusExAmmo and DeusExPickup categories.

To set up some random behavior, fill in the content2 and/or content3 values. If more than one content value is filled in, when the player breaks the crate, one of them will be randomly selected. To be consistent, put MedKits in the CreateBreakableMedMedical type, ammo in the CrateBreakableMedCombat type, and everything else in the CreateBreakableMedGeneral type.

That's it.


How to add a light switch

Prerequisites:
The Basics

Overview:
Adding a light switch to control one or more lights is easy.

1. Place the lights

First, place one or more lights in your map that you'd like to control with a light switch. Don't add a regular light though, add a TriggerLight (available under Light). Also, there are some items under Decoration -> DeusExDecoration that can be controlled by a light switch, such as a CageLight and Lightbulb. Set all of the Events -> Tag values of the lights to the same thing.

You also need to set the Object -> InitialState value to TriggerToggle. That will let you turn the light on and off.

NOTE: You don't need to set the InitialState value for decoration lights like CageLight and Lightbulb.

2. Set other properties

There are some other properties you can set under TriggerLight, but the defaults are the most realistic setting in most cases. If you put in a ChangeTime, the light will take the number of seconds you put in to fade on and off, sort of like a dimmer switch. However, if you also set bDelayFullOn to True, the light will simply pause for that number of seconds before turning on or off. Not sure how useful that is, but it's there.

Leave bInitiallyOn set to False.

3. Place the light switch

Now add your light switch. The built-in one is available under Decoration -> DeusExDecoration and is called, appropriately enough, LightSwitch. Be sure to put it where the player can easily reach it. About four grid squares off the ground (with the grid set to 16 units) works well.

Finally, set the light switch's Events -> Event value to the same name you assigned to the lights' Tag values in Step 1.

Since you've added some lights, be sure to hit F8 and Rebuild Geometry before running your map.


How to add an NPC and set up alliances

Prerequisites:
The Basics

Overview:
This tutorial will describe how to set up characters' alliances. Often you will want to add characters that immediately act as enemies or be able to control when a type of character is friendly or hostile.

1. Place one or more characters of the same type

Under Actor -> Pawn -> ScriptedPawn, there are a number of categories of characters you can add to a map. Add one. For example under HumanMilitary, you might add one or more MJ12Troop items.

2. Set up alliances to player

To get the character(s) to be an enemy, pull up their properties and expand Alliances -> InitialAlliances -> [0]. Set the AllianceLevel to -1, the AllianceName to Player, and bPermanent to True. If you had, say, 15 MJ12Troop's you wanted to set as enemies, you could right-click one of them and hit "Select all MJ12Troop actors". Then you could pull up and set the properties for all 15 at once. If you think you might need to set other characters' alliances to this one, you can also fill in the Alliance value with something, if there isn't a default value there. Try "mj12" for this exampe.

As stated in the SDK docs, the valid values for AllianceLevel are:

-1 = Hostile toward
0 = Neutral toward
1 = Friendly toward

The Alliance name of the player is, well, "Player".

The bPermanent value will force an alliance to stay friendly, neutral, or hostile. For example, if bPermanent was set to False and you shot at a friendly, their alliance will change to hostile and may very well start shooting back.

3. Set up alliances to other NPC's

If you want to have characters be friendly, neutral, or hostile to each other, you can define up to 8 alliance relationships per NPC.

Let's say we want to add some Greasels that don't like MJ12, but are friendly with Karkians and Grays. Add one or more Greasels to your map and pull up their properties. Expand Alliances -> InitialAlliances -> [0]. As it turns out, the Greasel class has a default Alliance name of "Greasel" and is already set up to be friendly to Karkians. As you might guess, the default Alliance name of a Karkian is "Karkian", and the default for a Gray is "Gray".

Expand the [1] item and set AllianceLevel to 1, AllianceName to Gray, and bPermanent to True.

Expand the [2] item and set AllianceLevel to -1, AllianceName to mj12 (the alliance name from Step 2), and bPermanent to True.

4. Change alliances via triggers

If you have bPermanent set to False, there are a number of events that can cause an NPC's alliances to change. However, you can also trigger an alliance change explicitly using an alliance trigger.

Expand Actor -> Triggers -> Trigger, select AllianceTrigger, and add one to your map. For an example, let's use the Greasels from the above example and have them turn against the player when the trigger is fired. Pull up the AllianceTrigger's properties and expand AllianceTrigger -> Alliances -> [3]. The reason we're using #3 is so that we don't step on the other alliances we set up in Step 3. Set AllianceLevel to -1, AllianceName to Player, and bPermanent to True. Also, set the Alliance value under AllianceTrigger to Greasel.

We're not done yet, though. We'll also need to fill in the Events -> Event value to the Tag value of the NPC's we're changing. In this case, the default Tag value for a Greasel is (you guessed it), "Greasel". So expand Events and set Event to Greasel.

You should now see red lines extending from the AllianceTrigger to the Greasels in your map. Here's a top view of an AllianceTrigger attached to 2 greasels.

Here, the greasels will turn to enemies as soon as the player steps into the range of the trigger. (the radius is set by changing the Collision -> CollisionRadius value) You could also set the CollisionRadius to zero and/or put the trigger where the player couldn't run into it and fire the AllianceTrigger another way. For instance, you could set up a conversation to trigger it in ConEdit.


How to add a security camera

Prerequisites:
Everything under The Basics

Optional:
How to add a security console

Overview:
Security cameras are an important ingredient in most any Deus Ex map. They can be used to trigger alarms, and can optionally be tied to security consoles, allowing the player to see through them, control, and de-activate them.

1. Place the camera

The SecurityCamera actor is available in the Class browser under Decoration -> DeusExDecoration -> ElectronicDevices -> HackableDevices. Place your camera(s) in an appropriate place, typically on a wall or ceiling, perhaps pointing toward an important door or room.

At this point, you'll have a stationary, active camera that will trigger an alarm, is not tied to a security console, is hackable, and has a hack strength of 20%. If that's what you want, then you're done!

2. Set the camera's general properties (optional)

The "SecurityCamera" properties are pretty straightforward. Right-click on your camera and select Properties and then expand the SecurityCamera category. These are covered in the EditorDocumentation.doc file, but what the hey:

bActive | True means the camera is initially "on"
bNoAlarm | True means that the camera will not trigger an alarm
bSwing | True means that the camera will pan left and right, which is pretty typical.
cameraFOV | This if the "Field of View" angle. In other words, the camera's field of vision. 65536 = 360 degrees, so the default of 4096 is 22.5 degrees.
cameraRange | How far the camera can see in Unreal units. (16 units = 1 foot)
swingAngle | How far the camera will pan left and right. Again, 65536 = 360 degrees, so the default of 8192 is 45 degrees.
swingPeriod | How many seconds it takes the camera to pan back and forth one time. A smaller value means that the camera will pan left and right more quickly, making it harder to sneak past.

3. Set the camera's "hackability" properties (optional)

The security camera, as with any "hackable device", can be set up so that a Multitool can bypass it. To set whether or not the camera is hackable as well as its strength, expand the HackableDevices category. As you might guess, set bHackable to True to allow the camera to be bypassed using Multitools. Set the hackStrength to the strength percentage (0.20 means 20%). A value of 20% means that a player untrained in electronics will need to use two Multitools in order to bypass the camera.

4. Associate the camera with a security console (optional)

If you would like the camera to be accessible via a security console, give it a Tag name in its Events properties by right-clicking on it and selecting Properties. Expand the Events category, and fill in the Tag value.

Now select the security console that you'd like to control your camera and pull up its Properties sheet. Expand ComputerSecurity -> Views. These correspond to the three video monitors that the player sees in the game when accessing a security console. Type in the tag values of the camera(s) you want to assign in the cameraTag fields. The player will see static for any of these that you leave blank.

Fill in a descriptive name (usually the type of room the camera is in) in the titleString field. The player will see this under the appropriate video monitor.

For more information on adding security consoles, see How to add a security console.


How to add an automated gun turret

Prerequisites:
Everything under The Basics

Optional:
How to add a security console

Overview:
This one's pretty self-explanatory. Adding those annoying gun turrets is easy, but there are a few things to watch out for.

1. Place the turret

First, you need to place an auto-turret in your map.

IMPORTANT: be sure to add only AutoTurret or AutoTurretSmall items to your map (available directly under Decoration -> DeusExDecoration). If you add an AutoTurretGun or AutoTurretGunSmall, it will NOT work correctly.

When you first place an auto-turret, it will show up with its base toward the floor. If you want a floor-mounted turret, that's fine, but a more typical placement is on a ceiling. So if you're going for a ceiling mount, be sure to rotate the turret so that it looks like this (its base toward the ceiling):

You'll notice that the gun itself does not show up in the map, but don't worry, it will show up and work just fine when the map is played.

Here's an example of an AutoTurretSmall and an AutoTurret (both ceiling-mounted) in the editor:

2. Set up the properties

Right-click on your turret and expand the AutoTurret category to see and set its properties. Here you can set things like how many rounds of ammo it has, the amount of damage each round does, the range, and the accuracy. These are all straightforward, except for the "titleString" value which appears to be unused.

Unfortunately, there doesn't seem to be a built-in way to override the "hackability" of AutoTurret items. They will always default to "hackable" with a hack strength of 50%.

3. Assign turret(s) to a security console

Finally, you can assign up to three auto-turrets to a security control. The player will be able to set each turret to Bypassed or to attack Allies, Enemies, or Everything. As you might have guessed, you assign a turret to a console by assigning a Tag value to the turret (under Events), and type that value into the turretTag field(s) of the console. See How to add a security console for more info.


How to add a security console

How to add a working security console

Prerequisites:
Everything under The Basics

Optional:
How to add a security camera
How to add an automated gun turret
How to make a Deus Ex style door

Overview:
Security consoles in Deus Ex are the wall-mounted devices that let you access up to three security cameras, lock/unlock/open/close doors, and set automated gun turrets to target either allies or enemies. All security consoles can be hacked into or logged into. In this section, you will learn to set up all of these functions.

1. Place the console

First, you'll need to add the console into your map. Make sure "Classes" is selected in the Browse drop-down, and expand the following items: Decoration, DeusExDecoration, ElectronicDevices, and Computers. Now select the third choice under Computers, ComputerSecurity.

Move the cursor into one of the 2D views and right-click where you want the console to go. Select it and rotate/move it to where you want it. A good rule of thumb is to place it around 60 to 80 units above the floor. That translates to 4-5 grid squares if you have the grid size set to 16. Of course, you can get as creative as you want, as long as the console is accessible.

2. Set up login account

When you first add a security console, it will have one account with "SECURITY" as both the User Name and Password. Since the console is a Deus Ex "Computer", it has a number of properties in common with personal and public computers. At a minimum, you'll want to change the existing account's user name and password. Expand the Computers property of the console and then userList. You can create up to eight accounts, but by convention, security consoles normally have just one.

Select a value for ComputerNode. It will affect what logo and text the player sees when attempting to log in. The titleString and titleTexture properties are not used by security computers, so you don't need to mess with them. See Setting up computers for more computer-specific details.

3. Assign security cameras to your console

If you want the player to be able to access any security cameras in your map, make sure you have added at least one camera to your map. Up to three can be assigned to each security console. These are available under HackableDevices. (for more information on security cameras, see How to add a security camera)

Assign each camera a Tag name in its Events properties by right-clicking on them and selecting Properties.

Now select the security console you added, and pull up its Properties sheet. Expand ComputerSecurity and Views. These correspond to the three video monitors that the player sees in the game when accessing a security console. Type in the tag values of the cameras you want to assign in the cameraTag fields. The player will see static for any of these that you leave blank.

Fill in a descriptive name (usually the type of room the camera is in) in the titleString field. The player will see this under the appropriate video monitor.

4. Assign doors to your console

You can also allow control of up to three Deus Ex-style doors from a security console. See How to make a Deus Ex-style door for more information. Generally, you'll want to have each door visible by the corresponding camera to make it clear to the player which door is being opened or closed, but that isn't required. Just assign a Tag value to each door's Events property and type that value in the doorTag value(s) of the security console. That's it! The player will now be able to lock, unlock, open, and close these doors.

5. Assign automated gun turrets to your console

Finally, you can assign up to three auto-turrets to control. The player will be able to set each turret to Bypassed or to attack Allies, Enemies, or Everything. IMPORTANT: be sure to add only AutoTurret or AutoTurretSmall items to your map (available directly under the DeusExDecoration class). If you associate an AutoTurretGun or AutoTurretGunSmall item to your console, it will NOT show up as a controllable gun turret in your console. These items are for handling the "hackable" nature of auto-turrets only. For more information, see How to add an automated gun turret. As you might have guessed, you assign a turret to a console by assigning a Tag value to the turret, and type that value into the turretTag field(s) of the console.

Rebuild your geometry with F8, save your level, and check it out.


Setting up computers

Prerequisites:
The Basics

Overview:
Computers in Deus Ex come in three flavors: security consoles, personal computers, and public computers. This section will describe in detail the things that personal and security computers have in common. Since public computer terminals do not require a user account or have any special appearance options, these topics don't apply to them.

1. User accounts

Each security console and personal computer can have up to eight user accounts set up on it. All you need to do it type in a user name and password for each one. Right-click on the computer and expand Computers -> UserList.

If you have several user names, you'll probably want to keep a document or something to keep track of them all. If you're going to set up e-mail messages for personal computers, it will become even more important.

2. Login window appearance

To set which logo graphic (and some other text) shows up in the login window, select a ComputerNode value in the Computers properties.

NOTE: Though the SDK docs mention that you can set the titleString, titleTexture, and nodeName values, those are not functional. Unfortunately, some coding is required to set up your own login window logo and "welcome" text. If you're comfortable with adding custom script code to your own package, I have a solution to this problem - click here.

The ComputerNode values you can choose from and the corresponding logos are:

CN_Area51 | CN_Everett | CN_HKNet | CN_Illuminati | CN_LuckyMoney
CN_MJ12Net | CN_NSF | CN_NYC | CN_PageIndustries | CN_China
CN_QueensTower | CN_QuickStop | CN_UNATCO | CN_USNavy | CN_VersaLife

So if you chose CN_PageIndustries, the player would see this when right-clicking on a personal or security computer:

3. Lockout delay

If the player has hacked a computer, but has let the "ICE Breaker" time run out, the computer will not be available until the lockout delay has passed. You can set the number of seconds to lock out the player by setting the Computers -> lockoutDelay value. The default is 60 seconds.


How to add a control panel and laser triggers

Prerequisites:
The Basics

Overview:
Adding a working control panel to your map is pretty straightforward. In this tutorial, we'll set up a control panel that can disable a set of those red lasers.

Download example map (9K), Provided by Vu Ngoc Toan

1. Place a set of laser triggers and set properties

Expand Actor -> Triggers -> Trigger, select LaserTrigger, and place some in a hallway in your map. The red arrow indicates the direction of the beam. A set of four from alternating directions works good. Select all of them (holding down Ctrl if there are multiples) and pull up their properties. Set the Events -> Tag value to something, such as LaserTrigger1. The default behavior is to trigger the alarm when a beam is broken.

2. Place a control panel and set properties

Expand Decoration -> DeusExDecoration -> ElectronicDevices -> HackableDevices, select ControlPanel, and add one to your map. Pull up its properties and expand HackableDevices -> UnTriggerEvent, and set the [0] value to LaserTrigger1 (or whatever Tag value you used in Step 1). You can also set the hackStrength value; higher numbers mean more Multitools will be required to bypass the control panel. When the player bypasses the control panel, the laser beams will turn off.

NOTE: Another typical use for control panels is to disable BeamTrigger's. BeamTrigger's are the blue beams. They are similar to the red LaserTrigger's, but they are not set up to automatically trigger the alarm. They were usually used in Deus Ex for things like triggering explosions, enabling gun turrets, and opening doors to release angry robots.


How to add an alarm unit

Prerequisites:
The Basics
Add an NPC with alliances

Overview:
Alarm Units can be set up so that NPC's can trigger them to cause a heightened level of alertness in particular groups of NPC's.

1. Place the alarm unit

Expand Actor -> Decoration -> DeusExDecoration -> ElectronicDevices -> HackableDevices, select AlarmUnit, and add one to your map. The default values work pretty well. You can set the alarmTimeout to reset after the given number of seconds. Also, if you set the Alliance value to the same value as a set of NPC's, only they will react to the alarm. (see Add an NPC with alliances for more details)

Under HackableDevices you can also set up the hack strength and whether the alarm unit is even hackable, just like you would for a keypad or control panel.

IMPORTANT: Be sure to put the alarm unit low enough so that the NPC can reach it. Placing it so that the bottom is about 48 units from the floor (3 squares with the grid set to 16) works well.

2. Set up NPC's to trigger the alarm unit

There is little point in having an alarm unit in your map if there aren't any NPC's set up to trigger it. Add a human NPC and set it up as an enemy of the player. Again, see Add an NPC with alliances if you don't know how to do that. Pull up its properties and expand the AI category. Make sure RaiseAlarm is set to RAISEALARM_BeforeFleeing. That's default for human pawns, but if you wanted to set that for an animal or robot you could.

NPC's also have an Orders -> AlarmTag value that you can to the Tag name of the alarm unit. I guess the idea is to have an NPC go to a particular set of alarm units. In practice, it seems to work just fine to leave that blank. The NPC will simply run to the nearest alarm unit.

3. Set up NPC's to react to the alarm unit

For NPC's to go into a heightened state of alertness when the alarm is triggered, be sure their Reactions -> bReactAlarm value is set to True. Another value you can set is Fears -> bFearAlarm. That will cause the NPC to run away when they hear the alarm. Typically this is True for civilians and False for soldiers/military pawns.


How to add a ladder

Prerequisites:
The Basics

Summary:
Ladders are an essential element in Deus Ex maps and luckily they are very easy to add.

Short version:
Load the CoreTexMetal texture library and select the Ladder category (group name). Use ladder_a for a flat surface that will contain a ladder texture. Use LadrBrwnMetal on a flat surface in front of rungs that have been defined by 3D geometry. In either case, it will work like a ladder in the game. You can also add your own ladder textures - any textures you add to a texture library with a Group name of "Ladder" will automatically work like ladders in the game.


How to add water

Prerequisites:
The Basics

Summary:
Since Deus Ex includes a swimming skill, an aqualung augmentation, and underwater gear, you may want to have some underwater areas in your maps. You may also want to use water as a decorative element. Be aware that this tutorial pretty much covers the same ground that many UnrealEd water tutorials cover, so there may not be much new information if you've already done one of those.

Adding water-filled areas is actually pretty easy, but it introduces a few new concepts, unless you've used sheet selector brushes, special brushes, and zones already. Sheet selector brushes (usually just called "sheet brushes") are equivalent to the normal red selector brush you're used to, but they're used to define a 2D shape. Special brushes are used to define "special" areas, such as water and zone portals. Zones are a way to define certain areas of your map as water, lava, and sky and let you control things like ambient lighting, dangerous areas, or even gravity.

1. Make an area for the water

First, you'll need to create an area in your map for the water to be. To start out, just find or make a room with an uncluttered floor. Subtract a chunk out of the floor with the cube selection brush (make an empty pool, in other words). I would highly recommend that you align your subtract brush with the 16 unit grid.

2. Move and size sheet brush

Now you'll change the red selection brush from 3D to a 2D sheet. Press the Build a Sheet button: (bottom button in the third column). Right-click on it and select Sheet Properties. Make sure "Floor/Ceiling" is selected, and enter size values that will exactly match the length and width of your empty pool. (count grid squares if you have to) Now move the sheet brush so that it exactly covers your pool; this sheet will define the surface of the water. If you create the surface exactly at the top, it will look a little weird, so you'll most likely want to lower it at least a bit.

3. Create Special Brush to define the water surface

If you want, you can select a water texture now, but don't worry about it, you can assign a texture later just like a normal surface. There are a couple in the CoreTexWater texture library. Now push the Special Brush button: (fifth button down in the third column). Select "Water" from the drop-down list. Go ahead and take the default values, which should be these:

Hit "Add Special", and you should get a brand new green brush. That's right, green. Isn't THAT special? You just created a "Non-solid" brush; these show up green in UnrealEd. To see the different types of brushes and their colors, see this illustration at Wolf's site. At this point, you've got a water surface that is translucent and that the player can pass through. In order for the area under the surface to actually act like water, we need to set it up as a "Water Zone".

4. Add WaterZone

Change the Browse drop-down to Classes and expand the following items: Actor, Info, and ZoneInfo. Select the WaterZone item. Now right-click in your map and select "Add WaterZone here". Move the new item so that it is inside your pool area and under the surface you defined (your non-solid green brush). There are a number of properties on the WaterZone object that you can play around with, but all of the settings for a normal water zone are already set up.

The texture of the water surface can be an animated or static texture, just like any surface. If you want to make a static texture a little more active, right-click on the water surface in the 3D view and select "Big Wavy" or "Small Wavy" on the Effects tab.

If you're building a map that features a large body of water, you may want to just create one huge brush the covers the whole area. Anything below the "water line" will be underwater. See the 01_NYC_UNATCOIsland.dx and 06_HongKong_WanChai_Canal.dx map for examples of this. Notice the green outline in the top 2D window? That's right - all of the water for each of these maps was defined with one brush.

Rebuild your geometry with F8, save your level, and go for a swim!


How to add a DamageTrigger

Prerequisites:
The Basics

Summary:
If you'd like to set up areas of your map which will poison, shock, burn, or irradiate the player or NPC's, you've come to the right place, you sick puppy. :)

NOTE: There is an alternative to using a DamageTrigger, which may be more appropriate, depending on what you're doing. If you need to define a very precise region for the "pain", it may be better to use a Pain Zone. DamageTrigger's only work within a circular region, but they work better with path nodes and are a little easier to set up. Pain Zones let you define a pain area based on an area of your level geometry. See How to add Pain Zones for more information.

1. Add a DamageTrigger item

Under Actor -> Triggers -> Trigger, select DamageTrigger, and add one to your map where you want the center of your pain area to be.

2. Set properties

Pull up the DamageTrigger's properties, and expand the DamageTrigger category.

Set the DamageAmount to how much damage occurs per "hit", the damageInterval to how many seconds between damage "hits", and bConstantDamage to False if you just want a one-time damage hit. Most of the time you'll want bConstantDamage to be True I would think.

As described in the SDK docs, to set up which type of damage to dish out, set the DamageType to one of these values: Shot, Exploded, TearGas, PoisonGas, HalonGas, Radiation, Flamed (catches player on fire), Burned, Shocked, NanoVirus, EMP, Drowned, or Stunned. This will affect which damage icons appear on the player's HUD. NOTE: it appears that NanoVirus was never implemented as it seems to have no effect.

Here are some of the common DamageType values and the corresponding HUD icons that the player will see:

Shocked
EMP
Burned
PoisonGas
Drowned, HalonGas
Radiation

If you'd like the DamageTrigger to also cause damage to NPC's, you'll need to set the Trigger -> TriggerType to TT_PawnProximity. That will allow any type of pawn to receive damage. If you'd like to control exactly which type of pawn will receive damage, you can use a TriggerType of TT_ClassProximity along with a ClassProximityType value to define what type of class will receive damage.

3. Add cosmetic effects (optional)

To be fair, you might want to provide the player some sort of audio and/or visual clue to go with your Pain Zone. Sparks, lightning bolts, and/or electrical sound effects would be good things to include if you have DamageType set to Shocked, for example. Many of the damage types go well with one or more particle generators. If you want add one to your map, they are available under Actor -> Effects.

If you have your DamageType set to PoisonGas, you might set the ParticleGenerator -> particleTexture property to one of the properties in the Effects texture package, such as Gas_Poison or Gas_Poison_A. I'll eventually do a separate tutorial on particle generators, but for now you can play with the settings or find some examples in the existing Deus Ex maps.

Rebuild your geometry with F8, save your level, and feel some pain!


How to add Pain Zones

Prerequisites:
How to add water

Summary:
If you'd like to set up areas of your map which will poison, shock, burn, or irradiate the player or NPC's, you've come to the right place, you sick puppy. :)

Some of the basic concepts required for this tutorial were covered in the How to add water tutorial, so this page assumes at least some knowledge of what a sheet brush is and how to use the Add Special Brush button. Please go through the water tutorial if you feel uncomfortable with either of those.

NOTE: There is an alternative to creating a Pain Zone, which may be more appropriate, depending on what you're doing. If you need NPC's to move through your pain zone, it may be better to use a DamageTrigger. For some reason, path nodes don't seem to work inside of a pain zone, but they will work along with a DamageTrigger. DamageTrigger's are also a bit easier to set up. The disadvantage is that you don't have as much control over the exact shape of the pain area, since a trigger is just based on a circular area. See How to add a DamageTrigger for more information.

1. Make an area for the Pain Zone

First, you'll need to create an area in your map for the Pain Zone to be. A room with one or two doorways (and no windows) will work well to get started.

2. Move/size sheet brushes and define the zone boundaries with Zone Portals

Change the red selection brush to a 2D sheet by pressing the Build a Sheet button: (bottom button in the third column). Right-click on it and select Sheet Properties. Make sure "X-Wall" or "Y-Wall" is selected if you have normal upright doorways, and enter size values that will exactly match the width and height of your doorway. (count grid squares if you have to) Now move the sheet brush so that it exactly covers your doorway.

Push the Special Brush button: (fifth button down in the third column). Select "Zone Portal" from the drop-down list:

Hit "Add Special", and you should get a brand new green brush exactly covering your doorway.

Repeat this step for any openings in your room that lead to areas outside the Pain Zone.

3. Check zone boundaries

Now hit F8 and Rebuild Geometry. If you've done Step 2 correctly, you will have a new zone. On the Rebuilder window, you should see the Zones value increase (should be at least one higher).

In the 3D view, click the little arrow button to bring down the menu bar. (it looks like this: ) Select Zone/Portal View from the Mode menu. You are now seeing the zones in your map color-coded. In this example, this green hallway has been "zoned":

Make sure your Pain Zone is a different color from the room or rooms next to it.

4. Add and set up a ZoneInfo item

Expand Actor -> Info in the Class browser to get to the ZoneInfo item. Add a ZoneInfo item somewhere inside of your Pain Zone. This works just like a WaterZone item. In fact, a WaterZone item is just a ZoneInfo item with its bWaterZone property set to true.

Pull up the ZoneInfo properties and expand the ZoneInfo category. Set bPainZone to True and set the DamagePerSec value to a number. The larger the number, the more damage the player or NPC will take per second.

As described in the SDK docs, to set up which type of damage to dish out, set the DamageType to one of these values: Shot, Exploded, TearGas, PoisonGas, HalonGas, Radiation, Flamed (catches player on fire), Burned, Shocked, NanoVirus, EMP, Drowned, or Stunned. This will affect which damage icons appear on the player's HUD. NOTE: it appears that NanoVirus was never implemented as it seems to have no effect.

At this point, your Pain Zone should be functional.

NOTE: Defining zone boundaries with Zone Portals, even if you don't add any ZoneInfo items to them is a good thing. They help to optimize your map.

Here are some of the common DamageType values and the corresponding HUD icons that the player will see:

Shocked
EMP
Burned
PoisonGas
Drowned, HalonGas
Radiation

5. Add cosmetic effects (optional)

To be fair, you might want to provide the player some sort of audio and/or visual clue to go with your Pain Zone. Sparks, lightning bolts, and/or electrical sound effects would be good things to include if you have DamageType set to Shocked, for example. Many of the damage types go well with one or more ParticleGenerator's or ElectricityEmitter's. If you want add one of those to your map, they are available under Actor -> Effects and Actor -> Effects -> LaserEmitter.

If you have your DamageType set to PoisonGas, you might set the ParticleGenerator -> particleTexture property to one of the properties in the Effects texture package, such as Gas_Poison or Gas_Poison_A. I'll eventually do a separate tutorial on particle generators, but for now you can play with the settings or find some examples in the existing Deus Ex maps.

Rebuild your geometry with F8, save your level, and feel some pain!


How to add a sky zone

Prerequisites:
The Basics

Overview:
If you need to show very distant objects in your map, such as stars in the sky, the sun, the moon, clouds, or distant buildings or mountains, you can set up a separate zone in your map called a Sky Zone. You may have heard this zone referred to as a "sky box" since you generally create a cube for this, but I prefer the term Sky Zone, since it's really just another type of zone and it doesn't necessarily have to be a cube.

Contents:
What is a Sky Zone?
Add a sky zone to your map (the easy way)
Add a custom sky zone to your map

What is a Sky Zone?

A Sky Zone is an area outside of your main map that is used to set up decorative elements that appear to be very far away. What does that really mean? It means that, for example, if you had a large subtract brush in your main map (where the player will run around in) that you set up as "the outdoors", you could set the top and side surfaces up as a "fake backdrop". When playing the map, the player would see the surfaces of the Sky Zone instead, but they don't change perspective as the player moves. In other words, those surfaces act like the sky or very distant objects.

Creating a sky zone is quite easy. The only hard part is making it look good!

To create a simple sky zone, create a subtract brush away from the main play area. Add a SkyZoneInfo item inside that brush (available under Actor -> Info -> ZoneInfo). The player will see everything in the Sky Zone from the perspective of the SkyZoneInfo item, so it's usually placed in the center of the zone, fairly close to the ground. Set up any surfaces, lighting, sheet brushes, or any other decorations, to create cloud layers, a moon, or a distant skyline inside the brush. Then just set the properties of any surfaces in the main play area that you want to act like "the sky" or whatever to Fake Backdrop. That's it. I'll cover that in more detail in the tutorials on the rest of this page.

Here are some examples of what they look like in UnrealEd from some real Deus Ex maps:

This is an overhead 2D view of the 01_NYC_UNATCOIsland.dx map from the real game. The area on the left is where the player moves around in, and the area on the right is the Sky Zone. This Sky Zone has a number of 2D sheet brushes in it for the New York City skyline, the moon, and a cloud layer. | This is the 02_NYC_Street.dx map from the real game. The area on the left is where the player moves around in, and the area on the right is the Sky Zone. In this example, the green outline in the Sky Zone is a non-solid sheet brush used to show a cloud layer. The SkyZoneInfo item inside the big subtract brush is what makes it a Sky Zone.

Add a Sky Zone (the easy way)

Overview:
The easiest way to add a good-looking sky zone to your map is to simply steal one from one of the Deus Ex maps.

1. Pull up a Deus Ex map and copy its Sky Zone

First pull up one of the real Deus Ex maps that has a sky zone you want to steal. For this example, pull up 12_Vandenberg_Cmd.dx (you'll have to enter the whole thing or hit *.dx and enter for the Deus Ex maps to show up when using Open level). The Sky Box in that map has a sunset, some stars, and a cloud layer. Set the red selection brush to a cube if it isn't already and locate the sky zone in the map. Position and size the red brush so that it completely surrounds everything in the sky zone. Make it as big as you want, as long as it doesn't surround anything in the player area.

Be sure that the red brush surrounds the sky zone in all three 2D windows. It should look something like this in the top and side 2D windows in UnrealEd:

Now press the "Select actors inside brush" button. If you've never used that before, it looks like this: . It's quite handy for selecting large areas of a map. The brushes and everything else inside the red brush should now be selected. Select Copy from the Edit menu.

2. Pull up your map and paste the Sky Zone in

Pull up your map and select Paste from the Edit menu. If the sky zone items are overlapping any part of your map, move everything off to the side. Since you copied EVERYTHING that was part of the other map's sky zone, you also got a SkyZoneInfo item as part of it, so you don't even need to add that.

Now all you need to do is set the surfaces in the "Player Area" of your map to Fake Backdrop. Typically, you have a large subtraction brush that all of your level is inside of. Select the top and all four side surfaces of that brush, right-click on one, and pull up Surface Properties. Check "Fake Backdrop".

Rebuild your geometry and you're done!

Add a custom Sky Zone

Overview:
If you'd like to be a little more creative with your sky zone, you can put just about any decorative items you want in it, and surface and light it however you please. Also, I'll cover creating a Sky Zone from scratch.

1. Create the Sky Zone

You should already have at least a basic "play area" of a map. Pull your map up, and create a large subtraction brush off to the side somewhere. The exact size of this brush or area is up to you, but you can get away with making it pretty small in reality. This would typically be a cube (hence the term "sky box"), but it can be whatever you want, as long as it's sealed off from the rest of the map. Expand Actor -> Info -> ZoneInfo, select SkyZoneInfo, and add one to your map in the middle of the large brush you just created. It looks like any other ZoneInfo item in the editor: . How high or low to position it is something you'll have to figure out, depending on what you're trying to do. Putting it roughly in the middle is a good starting point.

NOTE: The sky zone perspective can be rotated by setting the SkyZoneInfo property values under Movement -> Rotation.

2. Decorate

This part's up to you, but I'll mention some common techniques. The sky box textures used in the game are in the CoreTexSky texture package.

* There are some notable exceptions, but most of the time you'll set the surfaces inside your Sky Zone to Unlit. That way the surfaces will be completely bright and you won't need to add any lights.

* To create individual elements like the moon, you can use 2D non-solid sheet brushes and assign the texture to it. This works better with masked textures. You can create those types of brushes using the Sheet mode and the Add Special Brush button. A good preset to use in the Add Special Brush window is "Masked Decoration", though I would set Visibility to 2-Sided so that you don't have to worry about which direction the polygons are facing. A complete discussion about 2D brushes and masked textures is beyond the scope of this tutorial though.

* A common method of creating a cloud layer is to make a large 2D sheet that covers the whole sky zone. If you want the texture on that sheet to move, you can turn on the U-Pan and V-Pan feature on that surface. That just means that the texture will move in both the X and Y directions. Here's an example of how you might set the surface properties of a cloud layer:

(though you actually might instead turn off Unlit and use lights to light the middle of the cloud layer so that the clouds fade to black as they approach the horizon)

To control the speed that the texture moves, you can set the TexUPanSpeed and TexVPanSpeed values for the whole zone. Since a Sky Zone is, in fact, another zone, you can can values in the SkyZoneInfo item that affect everything in the zone. These two values control how fast ANY textures in the zone will move. You usually only have U-Pan and/or V-Pan turned on for a cloud surface in a sky zone, so that shouldn't be an issue. The default values of 1.00 are pretty fast. I would set these to something like 0.05 for slow moving clouds and maybe 0.25 for faster clouds.

* If you want to get fancy, you could also add other elements like helicopters flying around in the distance or something. You might need to adjust the Display -> DrawScale value to scale it down and use InterpolatonPoints to fly it around. I don't remember anything like that in Deus Ex though.

* If you want to get REALLY creative, you can do stuff like make the main sky zone brush continuously rotate. Maybe that'd be good for simulating being on a rotating space station or something.

NOTE: Lens flare effects do NOT work inside of Sky Zones. It sucks, since if you had the sun in a sky zone, it would have been the perfect place for a lens flare. Maybe we'll get that with the Unreal 2 engine?

3. Set Fake Backdrop surfaces

This is the easy part and works exactly the same as "the easy way." Set the surface properties of any surfaces within your main player area that you want to be drawn as the sky to Fake Backdrop. Rebuild your geometry and you're ready to go.

Here are some other Sky Zone (sky box) tutorials, many of which include more tips and tricks for decorating your sky zone:

http://www.planetdeusex.com/constructor/Tutorials/outdoors/outdoors.htm
 http://www.planetunreal.com/uedlab/Tutorials/Decorate_your_sky_zone/decorate_your_sky_zone.html
 http://unreal.gamedesign.net/tutorials/7/wolftut7.html
http://www.planetunreal.com/utcity/tutorials/How_to_Create_Skyboxes.html
http://www.planetunreal.com/uedlab/Tutorials/Make_and_understand_a_Sky_Zone/make_and_understand_a_sky_zone.html
http://www.unreal.co.za/shrimp/tutorials/skybox.htm
http://www.gameznet.com/unreal/edsky.html
 http://www.planetunreal.com/visions/tutorials/9.htm
 http://decyber.com/unreal/build/skyzones.htm


How to add glass windows

Prerequisites:
How to add a Deus Ex style door

Overview:
Once you know how to add a DeusExMover brush, you pretty much know how add windows and breakable walls too. I'm not going to cover adding a DeusExMover in as much detail as my door tutorial, so if you don't know how to do that, complete How to add a Deus Ex style door first. You add windows by creating BreakableGlass mover brushes, which is a subclass of DeusExMover. Though it's called "BreakableGlass", there's a simple way to make glass unbreakable too.

1. Create and texture a basic addition brush

Actually, the first step should be to make sure you have cut out an opening for your window. Make sure you're actually connecting two "cut out" places, of course. I tend to use the 16 unit grid so that the glass window itself will fit perfectly.

Shape the red selection brush into the size of your window and place the brush so that it is floating inside a room, just like when making a door. Make it 1 unit thick for this lesson. Windows that are 1 - 4 units thick seem to look the best. Hit the Add Brush to World button: , and texture it. The CoreTexGlass texture library has several you can use. A good one to use for a generic window is the first one: 07WindOpacStrek. The texture looks black in the browser, but in the game a faint texture will be visible. Just like any other mover, you can't change the textures once you actually create the mover brush.

Before going on, be sure that all of the surfaces of the brush are set to "Translucent". Do that by right-clicking on one of the brush's surfaces and pick Select -> All Adjacents. Then right-click again and pick Properties, then click the Translucent option under Effects.

2. Create a BreakableGlass brush

Now size the red selection brush so that it is a bit bigger than the brush you just added. Be sure to check all 3 2D windows. Hit the intersect button: and the selection brush will be perfectly sized to your window brush. Make sure Classes is selected in the Browse drop-down and expand the following items: Actor, Brush, Mover, and DeusExMover. Select BreakableGlass. Now press the Create Mover button: .

As with any movers, at this point, you will actually have THREE brushes in the same place: the red selection brush, the blue "Addition" brush, and a purple "Mover" brush. Move the red selection brush out of the way, and click on the purple brush to select it. Move it somewhere, and you'll notice that your original brush is still there. De-select the mover brush and select the blue brush. Delete it (either hit the Delete key on the keyboard or right-click and select Delete). Now hit F8 and Rebuild Geometry to get rid of your original brush in the 3D view.

The purple brush that is now in your map will only show up as an empty wireframe. However, it will show up fine when playing the level.

3. Move the window into position

Make sure the grid is on, and move your window into the opening that you created. NOTE: I originally thought that you had to move the brush's KeyFrame 1 out of position, but that's not the case.

Don't want a window to be breakable at all? Easy, just right-click on it and pull up its properties. Expand the DeusExMover item and set bBreakable to False. You can also play with the other properties to customize your windows (such as making them stronger or weaker), but the default values work well.

When testing out your breakable window, it's helpful to make sure there's a crowbar or other weapon nearby.

Rebuild your geometry, save your level, and break something!


How to add breakable walls

Prerequisites:
How to add a Deus Ex style door
 How to add glass windows

Overview:
You'll need to know How to add a Deus Ex style door and How to add glass windows before doing this one. Once you know how to add breakable glass, you already know how to add breakable walls, even if you didn't know it.

1. Create and texture a basic addition brush

As with windows, the first step should be to make sure you have cut out an opening in your wall. Make sure you're actually connecting two "cut out" places, of course. It may be more intesting to make a "broken" hole in the wall rather than just a square. Making a really jagged hole will require some good brush building skills (or you could import a more complex shape as a .DXF file) You may at least want to rotate the brush a bit to give the opening a somewhat irregular look.

Take the same red selection brush you used to cut the hole in your wall and place the brush so that it is floating inside a room, just like when making a door or window. Hit the Add Brush to World button: , and texture it. I would assign a very similar texture or the same texture as your wall. Even if you use the same texture, you can make the texture offset a little to get a clue to the player that something's different about this section of the wall.

2. Create a BreakableWall brush

Now size the red selection brush so that it is bigger than the brush you just added. Be sure to check all 3 2D windows. Hit the intersect button: and the selection brush will be perfectly sized to your wall brush. Make sure Classes is selected in the Browse drop-down and expand the following items: Actor, Brush, Mover, and DeusExMover. Select BreakableWall. Now press the Create Mover button: .

As with any movers, at this point, you will actually have THREE brushes in the same place: the red selection brush, the blue "Addition" brush, and a purple "Mover" brush. Move the red selection brush out of the way, and click on the purple brush to select it. Move it somewhere, and you'll notice that your original brush is still there. De-select the mover brush and select the blue brush. Delete it (either hit the Delete key on the keyboard or right-click and select Delete). Now hit F8 and Rebuild Geometry to get rid of your original brush in the 3D view.

The purple brush that is now in your map will only show up as an empty wireframe. However, it will show up fine when playing the level.

3. Move the wall piece into position

Make sure the grid is on, and move your wall piece into the opening that you created. If there are any gaps, it will look weird, so turn the grid off for this if you have to.

To set the strength of your breakable wall piece, set the doorStrength property under DeusExMover. The default is 40%. If you want to make a thin piece of material that even a crowbar can break, lower it to 20% or even 10%. You could also set bBreakable to False, but I'm not sure what the point of that would be.

When testing out your breakable wall, it's helpful to make sure there's a LAM or something like that nearby.

Rebuild your geometry, save your level, and blow something up!


How to add ambient sound

Prerequisites:
The Basics

Overview:
Adding ambient sounds (background sounds that loop) is quite easy and is a must for that finishing touch.

1. Place the AmbientSound item

Expand Actor -> Keypoint, select AmbientSound, and add one to your map where you want the source of the sound to come from. It will look like this: in the editor.

2. Set its properties

Chang the Browse menu to SoundFX and press the Load button. Load up the Ambient.uax sound effects package (even if you already have a few Ambient sound effects listed). Choose an ambient sound effect (you can listen to it by hitting the Play button) and select it. Pull up the properties of your AmbientSound item in your map and expand the Sound category. Click in the AmbientSound value and hit the Use button. That's the most important setting, since, well, that's the sound it will make.

The SoundRadius is another important value. It determines the range of the sound. It's not in Unreal units though, so be sure to use the Radii View from the Actors menu (in the overhead 2D window, pull down the editing window menu bar by hitting the [image] button if necessary). The SoundVolume value should be clear enough. :)

NOTE: Every "Actor" has a set of Sound properties, so if you have something in your map that you want to act as the source of the sound, you can just set up its ambient sound properties. You don't necessarily need an AmbientSound item.


How to set up in-game music

Prerequisites:
The Basics

Overview:
Setting up your map to use music is really easy. For more in-depth information about triggering MusicEvent's and creating your own custom music, see How to Create Custom Music.

1. Set Level Properties

In UnreadEd, just go to the Options menu and select Level Properties (or hit F6). Expand the Audio properties and click in the Song value area. The easiest way to select a song is to click on one in the Music browser, then hit the Use button in the Song value. You'll have to load a song into the browser first - you'll find the .UMX music files in your \DeusEx\Music folder.

That's it!


How to add an elevator, Part 1

Prerequisites:
Everything under The Basics
How to add a Deus Ex style door
Download and install the Carone Elevator mod

Overview:
Creating a fully functional elevator can seem like a daunting task, but fortunately there is better way than fumbling around with Dispatchers and tons of triggers. The Carone Elevator mod does much of the work for you. It not only makes setting up elevators pretty painless, it also adds a good deal of functionality.

UPDATE: On March 28, 2002, Carone made an updated version of his elevator mod available, which fixes a major bug and provides even more functionality. Be sure to download the latest version! Also, be sure to check out his Hotel Carone mod.

In Part 1 you will build a basic elevator with two buttons in it to simply move from floor to floor. If you're creating a simple platform type elevator, that may be all you need. Elevators in the real world are rarely that simple however. In Part 2 you will add doors at each floor, as well as "call buttons" at each floor. Finally, in Part 3 you will add a set of inner doors that move with the elevator and an interior open/close button.

1. Download and install the Carone Elevator mod

All three parts of this tutorial use the Carone Elevator mod. However, Part 1 could be done without it by substituting "ElevatorMover" for "CaroneElevator" and "SequenceTrigger" for "CESequenceTrigger". I would recommend against that, since you'll most likely want to include the features in Part 2 and 3, which are only available using the mod.

Download the mod (click here), exit UnrealEd if you're in it, copy the CaroneElevatorSet.u to your \DeusEx\System folder, and add the line "EditPackages=CaroneElevatorSet" to the [Editor.EditorEngine] section of your DeusEx.ini file. Now when you pull up UnrealEd, you'll see a new brush type under Brush -> Mover called CaroneElevator, a new trigger called CESequenceTrigger, and a new trigger called CESequenceDispatcher.

Note that you will have to distribute the CaroneElevatorSet.u file with your map(s). Or you could extract the .uc files and include them in your own package, if you are comfortable with that. Please remember to give credit to Carone if you do distribute anything that uses his mod.

2. Create the initial elevator brush or brushes

You are free to create any shape you can think up for your elevator, but for this tutorial, I'll step through creating a traditional looking elevator as an example. You may want to start with a map that you've already created that has multiple floors.

Now you'll build the basic shape of the elevator. First, be sure to select Reset -> All from the Brush menu. You want to make sure the selection brush is not scaled in any way. Now right-click on the "Build a Cube" button, select Cube Properties, and select Hollow. Make it any size you want, but here's a suggestion to get you started:

Hit the Build button and move the selection brush somewhere where it isn't touching any brushes. Select a texture from the texture browser and hit the Add Brush To World button (looks like this: ).

At this point you will have a hollow cube with no way to get in, so create a subtract brush for the doorway. Here's an example for setting the selection brush size:

Move the selection brush into place to cut a doorway into your hollow brush and hit the Subtract from Word button (looks like this: ).

Hit F8 and Rebuild Geometry. Be sure to completely texture your elevator before going on to the next step. You won't be able to change the textures on your mover brush. It might be a good idea to keep your original elevator brushes somewhere in your map in case you do need to change the textures (you'd have to rebuild your mover, but you won't have to start from scratch).

3. Create the CaroneElevator mover brush

The next step will be to make your set of "normal" brushes into a mover brush - you'll actually be creating a new brush based on the brushes you've already added. To make 100% sure that the selection brush is correct, size the red selection brush so that it is a bit bigger than the brush you just added. Be sure to check all 3 2D windows. Hit the intersect button: (third button down in the third column) and the selection brush will be perfectly sized to your elevator brush. Make sure Classes is selected in the Browse drop-down and expand the following items: Actor -> Brush -> Mover. Select CaroneElevator. Now go ahead and press the Create Mover button: (sixth button down in the third column).

At this point, you will actually have THREE brushes in the same place: the red selection brush, the blue "Addition" brush, and a purple "Mover" brush. Move the red selection brush out of the way, and click on the purple brush to select it. Move it somewhere, and you'll notice that your original brush is still there. The purple brush that is now in your map will only show up as an empty wireframe. However, it will show up fine when playing the level.

If your map doesn't already have multiple floors (or simply have one room above another), you'll need to set that up. If the area where your elevator is going to move is already "subtracted", then your fine. Otherwise, you may need to create a subtract brush to allow room for your elevator to move. This is essentially your "elevator shaft".

4. Set up the elevator key frames for each floor

You may need to create doorways into your elevator shaft, depending on how you set it up. Using subtract brushes of the same height and width of the subtract brush you used to carve the elevator door earlier should work well. Subtract doorways at each floor and make sure they are lined up vertically.

Move your elevator brush where you want your first floor to be. At this point, if you want to make sure your mover brush is OK, go ahead and hit F8, Rebuild Geometry, and make sure you can walk into and out of your elevator.

Now right-click on your elevator mover and select Mover Keyframe -> Key 1. This will be the position of the elevator at your second floor. Move your elevator to your second floor. If you'd like your elevator to start out on the first floor, right-click on it again and select Mover Keyframe -> Key 0. Your elevator should move back to the first floor.

5. Add CESequenceTrigger's for each floor

Give your elevator brush a name. Right-click on it, pull up its properties, and set its Tag value to something, such as Elevator_A.

You'll need one CESequenceTrigger item for each floor. So expand Actor -> Triggers -> Trigger and select CESequenceTrigger. Add one to your map near your elevator for controlling your first floor. Set its Events -> Event value to the name of your elevator (such as Elevator_A) and set its Tag value to something descriptive such as ElevatorA_Floor1. Now expand the CESequenceTrigger category and set seqnum to 0. It will already be zero, but it's important to know what the zero is doing for you. It refers to the Keyframe number of your elevator. In this case, you put your elevator's first floor position at Key 0.

Now add a CESequenceTrigger for your second floor. Set its Event value to the name of your elevator and set its Tag value to something like ElevatorA_Floor2. This time, set the CESequenceTrigger -> seqnum value to 1.

To set up additional floors, add additional CESequenceTrigger items the same way.

6. Add interior floor buttons and associate them with CESequenceTriggers

Now you'll add two buttons inside the elevator to control moving to the first and second floors. If you have more than two floors, you can add the others later, but for now, let's just get two floors working.

In the Class browser, expand Actor -> Decoration -> DeusExDecoration and select Button1. Add this to your map and position it so that it's flush with the inside wall of your elevator.

Right-click on the button and pull up its properties. Set its Movement -> AttachTag to the name of your elevator. This will cause the button to move with the elevator. Let's make this the button to go to the second floor, so expand the Button1 category and set ButtonType to BT_2, which will show up as a "2" button in the game. If you are only going to have two floors, you could also set the ButtonType to BT_Up, which will show up as an "up arrow" button. Now the important part: set the button's Events -> Event value to whatever you named your CESequenceTrigger for the second floor. For example, ElevatorA_Floor2.

Add another Button1 item for going to the first floor, but set its ButtonType to BT_1 (for a "1" button) or BT_Down (for a "Down arrow" button). Set its Movement -> AttachTag to the name of your elevator and its Event to the name of your first floor CESequenceTrigger, such as ElevatorA_Floor1.

At this point, you should be able to enter your elevator, hit the appropriate button, and go to a different floor. Give it a try!

7. Add elevator sound effects (optional)

You may have noticed that your elevator is eerily silent. To add some sounds, select SoundFX in the Browse drop-down, then MoverSFX in the next drop-down, and finally Elevator. Pull up your elevator mover's properties and expand the MoverSounds category. After selecing a sound effect from the SoundFX browser, click on one of the MoverSounds values and hit the Use button. Here's an example to get you started:

In Part 2, you'll add call buttons and doors to each floor.


How to add an elevator, Part 2

Prerequisites:
How to add an elevator, Part 1

Overview:
As you can guess, this tutorial continues where Part 1 left off. In this one, you'll add doors and call buttons at each floor, which is quite easy using the Carone Elevator mod.

1. Add "call buttons" at each floor

Adding buttons at each floor to request the elevator is easy. Add a Button1 somewhere on the wall of your first floor room. Set it's Event value to the name of your first floor CESequenceEvent, such as ElevatorA_Floor1. You don't want to set its AttachTag, since you don't want it to move with the elevator. You may want to leave its ButtonType as BT_Blank for a blank button, or set it to the appropriate arrow if you've only got two floors.

If you're unclear on the typical placement of this type of button, in the picture below I've put a red circle around the one I used in the test map for this tutorial:

Now add another Button1 at the equivalent location at your second floor and set its Event to ElevatorA_Floor2 (or whatever you called your second floor CESequenceEvent). Repeat this for any additional floors you have.

Go ahead and try it out if you want. You may want to put your PlayerStart at a floor where the elevator does not start at, or add stairs or something to get to a floor where the elevator is not at.

2. Add doors at each floor

The Carone Elevator mod includes the ability to automatically control a door (or set of doors) at each floor. All you have to do is create the door brushes, position their key frames, and set some properties.

In order for this to work, you'll need to create your doors as CEDoor mover brushes. Go ahead and create your Addition brush and texture it. If you've been following the values in Part 1, these dimensions will create a door half the size of the elevator doorway:

So you could have a pair of these that move inward to work like a typical pair of elevator doors.

At this point, you should be familiar with how to create a mover, so go ahead and do your intersection. Before hitting the Create Mover button, expand Actor -> Brush -> Mover -> DeusExMover and select CEDoor. That's a special Carone mover specifically designed to work with CaroneElevator's.

Once you have your mover, you can duplicate it however many times you need to. The idea is to have a set of doors at each floor that operate the same way. Be sure to give each door a Tag value. Each brush or set of brushes at each floor should have the same Tag value. So for the doors at your first floor, you might call them ElevatorA_floor1_outerdoors and so on. The reason I put "outerdoors" at the end of the name is to differentiate them from your inner doors, if you add those later. Inner doors are discussed in Part 3.

Move all of your doors into their closed position. Don't forget to create subtract brushes to give the doors somewhere to move to, if there are solid areas where the doors will go when opened.

3. Set up door keyframes

Right-click on a door and select Mover Keyframe -> Key 1. Move it into its open position. You'll most likely want to go ahead and select Mover Keyframe -> Key 0 so that the door starts out as closed. Repeat this for every CEDoor you added.

4. Associate doors with elevator and set other elevator properties

The hard part's done; now it's just a matter of setting up some properties on your elevator brush.

Pull up the properties of your CaroneElevator mover and expand CaroneElevator -> CEEvents. Each one corresponds to a key frame of your elevator. So set [0] to the name of your first floor doors, [1] to the name of your second floor doors, etc.

Also, expand CElevatorAdvanced and set bCEControlsDoors to True so that your elevator will interact appropriately with your doors.

Hit F8, Rebuild Geometry, and give it a try.

In Part 3, you'll add inner doors and an interior open/close button.


How to add an elevator, Part 3

Prerequisites:
How to add an elevator, Part 2

Overview:
As you can guess, this tutorial continues where Part 2 left off. In this one, you'll add inner doors that move with the elevator as well as an interior open/close button, which is quite easy using the Carone Elevator mod.

1. Add an interior open/close button

A nice feature of the Carone Elevator mod is a special button for simply opening and closing the doors. Since Carone Elevators can be set up to automatically close after a while, picture this scenario: the player hits the call button and waits for the elevator to arrive and the doors to open. He/she walks in and then just stands there. After a few seconds, the doors close. The player then realizes he needed to do something on the same floor. While the player *could* press the button of the floor he's on, wouldn't it be cooler to have an "open doors" button like a real elevator? As long as the elevator is at a floor, the CEDoorButton lets the player immediately open the doors if they're closed or close them if they're open.

It couldn't be easier to set up. In the Class browser, just expand Actor -> Decoration -> DeusExDecoration -> Button1 and select CEDoorButton. Add one to your map and position it inside your elevator. Set the Events -> Event value to the name of your elevator (I've been using Elevator_A in this tutorial). Be sure to also set the Movement -> AttachTag value to the same thing so that the button moves with the elevator. That's it!

2. Add inner doors

The Carone Elevator mod also includes the ability to automatically control "inner" doors that move with the elevator. If you have been using pairs of doors at each floor, you can duplicate a pair of movers to use as inner doors. Exactly how you set those up is up to you. This screenshot shows what I did for this example, but a better way would be to create an elevator with a recessed portion to allow for the inner doors. Just keep in mind that you'll need to allow space for these new doors to not only move open and closed, but also up and down with your elevator.

Your inner doors should also be CEDoor movers, just like your other doors.

Be sure to set the AttachTag value of your inner doors to the name of your elevator (such as Elevator_A), so that they move with the elevator. Also, set the Tag values of all the inner doors to the same value, such as ElevatorA_innerdoors.

3. Set up inner door keyframes

Set the Key 0 and Key 1 frames for the closed and open positions of your inner doors. Again, you'll most likely want to set them back to Key 0 (the closed position) when you're done, so that they start out closed.

4. Associate inner doors with elevator and set other elevator properties

Pull up the properties of your CaroneElevator mover and expand CElevatorAdvanced. Set the CESlaveMover to the name you gave your inner door brushes and set bCEControlsSlave to True.

That wasn't so bad, was it? Hit F8, Rebuild Geometry, and give it a try.

For more information on the other properties you can set, see the Readme file included with the Carone Elevator zip file.


How to add an earthquake

Prerequisites:
The Basics

Overview:
One way to add "shaking around" or "earthquake" effects to a map is by using the ShakeTrigger. Perhaps you want to give the player the impression that a large explosion has occurred.

NOTE: The explosion "shakes" and sound effects after you blow up the ship in Deus Ex were done using mission scripting and are much more elaborate that what you can do with a simple ShakeTrigger. If you'd like to look at the UnrealScript for that, it's in the ShipExplosionEffects function in the Mission09.uc mission script.

1. Place the ShakeTrigger

Under Actor -> Triggers -> Trigger, select ShakeTrigger and add one to your map. Move it somewhere where the player will be able to run into it. You can use the Actors -> Radii View in the overhead 2D window's menu to look at the "collision radius". Adjust that if necessary by changing the Collision -> CollisionRadius value.

2. Set properties

Pull up the ShakeTrigger's properties and you'll see that under the ShakeTrigger category there are some values you can set. The shakeRollMagnitude determines how much the player's view will rock back and forth, the shaketime is how many seconds the "quake" will last, and the shakeVertMagnitude determines how much the player's view will shake up and down.

3. Trigger a sound effect (optional)

This part is optional, but your shaking effect might seem weird without any sound to go with it. For this example, set the ShakeTrigger -> shaketime on your ShakeTrigger to 2.0 and set its Events -> Event value to explosionSound.

Under Actor -> Triggers, select SpecialEvent, and add one to your map near your ShakeTrigger. The icon for the SpecialEvent trigger in the editor looks like a normal trigger, but has an exclamation point on it: . Pull up the properties for the SpecialEvent in your map and set Events -> Tag to explosionSound.

You'll also need to set Object -> InitialState to PlaySoundEffect, since that's what we want it to do.

The final step is to set SpecialEvent -> Sound to the sound effect you want to play. Go to the Browse menu and select SoundFX. For the next two drop-downs, select DeusExSounds, then Generic. Select an appropriate sound effect, such as LargeExplosion1, click on the "Sound" property, and press the Use button.


Making and Using Prefabs

Prerequisites:
The Basics

Overview:
There are several reasons why you might want to create and/or use "prefabricated" elements in your maps. For example, it's nice to have a selection of prebuilt sets of brushes for common items like tables, doors, beds, and light posts as well as more complex items like pool tables, curved hallways, or even 747 jets. You can create prefabricated (or "prefab") items from scratch, or steal them from the Deus Ex maps. There are a couple of different methods for using prefabs, but the method I use not only retains all of the brush texturing, it also allows non-brush items to be included, such as lights, NPC's, triggers, patrol points, etc.

Download:
Download four example prefabs (46K)

Contents:
Using an existing prefab
Creating a prefab from a Deus Ex map

Using an existing prefab

Overview:
To give you an idea how it works, I've created four example prefabs from some of the Deus Ex maps.

1. Load ALL texture packages

Since a prefab (the way I do it) could reference any number of textures, be sure to load all of the texture packages into UnrealEd before importing the prefab. In the texture browser, hit Load, select the first texture package, scroll to the last one, hold down Shift, and select the last one. Now hit Open and all of the texture packages will load in. There will likely be a pause since every texture from the game will now be loaded.

2. Import the prefab

Pull up a map if you haven't already and make sure there's enough room available for a bed, closet, end table, or if you want, a 747. Be sure to download the example prefabs at the link at the top of this page and unzip them somewhere.

From the File menu, select Import Level. An Import Map dialog box will come up requesting the name of a .T3D file. (a .T3D file is an "Unreal Text File". Basically, that's a text file version of a map or part of a map that you can actually pull up in Notepad. If they are set up correctly, they can be imported into another map) Find one of the .T3D files that you downloaded and double-click on it.

You should get the "Import a map" dialog box. Be sure to select "Add contents to existing map", since we want to add the prefab to your existing map. Hit Import.

3. Move prefab into position and rebuild geometry

The prefab should now be loaded into your map. Zoom out and pan around if you can't find it - it won't necessarily be centered in the 2D views. While the brushes and actors of the prefab are still selected, move the whole assembly where you want it. Hit F8 and rebuilt geometry. The bed, closet (with working doors), end table (with working lamp), or 747 should now be visible in the 3D view.

NOTE: Not all .T3D files (in fact, very few) that you will find on the web are set up this way. Unfortunately there is another type of .T3D file that is created with the Brush -> Export feature, but the two types are not compatible.

Creating a prefab from a Deus Ex map

Overview:
You can create your own prefabs based on elements in the real Deus Ex maps fairly easily. Use this same method for creating prefabs from your own brushes or sets of objects. In this example, we'll steal the pool table from the New York City bar map, complete with working pool balls.

1. Load a Deus Ex map

Pull up the 02_NYC_Bar.dx map. You'll have to enter *.dx in the Open Map File dialog box to see the Deus Ex maps show up in the list.

2. Position and size red brush around the desired elements

Let's say we want to grab the pool table from the bar, but not the overhead light or any other elements. Find the pool table in the map and move/resize the red brush so that it is surrounding the pool table, but not anything else. The overhead and side 2D windows should look something like this:

3. Select elements to copy

Hit the "Select actors inside brush" button. If you've never used that before, it looks like this: . It's quite handy for selecting specific areas of a map. The brushes and everything else inside the red brush should now be selected; it should look like this in the 2D windows:

You DO want to include the ZoneInfo item, since that sets up the surface of the pool table with lower friction.

4. Copy elements and paste them into an empty map

Select Copy from the Edit menu. You can now either hit New Level from the File menu or pull up a second instance of UnrealEd. If you're a bit light on RAM, you may want to just hit New Level.

Select Paste from the Edit menu to paste the elements into the empty map. At this point, the pool table is not usable, since it is not in a hollow area, but that's not important. We're just doing this to create a prefab, not play pool. :)

At this point in the process, I like to position the elements in the center of the map to make it more predictable where it will show up when it's imported into a map later. But that's optional.

5. Export the prefab

Now just select Export Level from the File menu and give your prefab a name, such as PoolTable.t3d. You can now use the same method described in the first part of the tutorial to load the pool table into any map.


How to add custom packages

Prerequisites:
Everything under The Basics

Overview:
This page will show you how to create your own custom packages to Deus Ex. Why would you want to do that? If you want to include any custom textures, meshes, sound effects, music, or scripts, not to mention conversations, you'll need to be familiar with how to set up your own packages and how to compile them.

1. Create directories under \DeusEx

Create a folder under your \DeusEx game folder. Give it a descriptive name, perhaps the name of your map or mod. Then create a folder under THAT called "Classes". If you are going to be importing custom meshes, you can also create a folder called "Models." For example, if you called your package Atestmap, it would look like this:

2. Edit DeusEx.ini

If you need to set up a new package, first pull up the DeusEx.ini file in your \DeusEx\System folder. Add a line at the end of the [Editor.EditorEngine] section like this:

EditPackages=Atestmap

...where "Atestmap" is the name of your new package.

3. Compile your package

Now all you need to do is compile your package. Each script file (ending with an extension .uc) will define a class in your package. These are stored in your Classes folder. Don't be intimidated by these .uc files. While they can include elaborate UnrealScript, a lot of times you just want to use them to import textures, sounds, and/or meshes.

NOTE: You need at least one .uc file in your Classes folder, or there won't be anything to compile. If you just want to try building a package, but don't have any .uc files yet, try the How to get the mission startup text to show up for a good one to try. If you're doing this tutorial because you are following the DataCube text or texture importing tutorials or something like that, you don't need to do the "ucc make" yet.

Pull up a command prompt (MS-DOS prompt) and go to your \DeusEx\System directory. Type in:

ucc make

...and wait for it to do its thing. You should end up with a new file, in this case, Atestmap.u in your \DeusEx\System directory. Each time to alter your .uc files or want to rebuild your package for any reason, you'll need to delete your custom .u package file. Then just do "ucc make" again.


How to add a personal computer

How to add a personal computer (and set up e-mail & "special options")

Prerequisites:
The Basics
How to add custom packages
Download the latest version of the SDK

Related:
Adding DataCubes, books, and newspapers
Adding a public computer

Overview:
Personal computers in Deus Ex are used for two things: prying into characters' personal e-mail messages and activating triggered events (Special Options).

NOTE: As as March 2, 2001, you can build text into your own packages, rather than overwriting DeusExText.u. You must use the latest (and probably final) version of the Deus Ex SDK for that to work. You can get it here as of this writing.

1. Create a folder called "Text"

First of all, this tutorial will describe how to build the text you write into your *own* package. If you aren't familiar with setting up your own packages, please follow How to add custom packages.

You will create the text for each of your e-mails in separate text files. A decent convention to follow is to create a folder called "Text" under your package folder for keeping these, so go ahead and do that, if you don't already have that set up. You can also get fancier, such as creating subfolders under that and so on.

For this tutorial, whenever you see "MyPackage" just substitute the name of your package.

2. Create e-mail messages

You can create as many e-mail messages as you'd like to. Each one will be a seperate text file that you can edit with Windows Notepad or whatever.

To create an e-mail message, pull up Notepad and type (or copy & paste) this text in or something similar:

<P>Steve,
<P>
<P>Your presentation on nano-technology and how it could be used to improve foot ointment was fascinating. That dumb ass Tom never comes up with anything brilliant like that. Steve Tack, you're my hero!
<P>
<P>Nicole

Save the file as 16_Email01.txt into your \DeusEx\MyPackage\Text\ folder. The naming convention for the filename is the mission number, followed by "Email", and then a sequential number, as mentioned in the SDK docs.

As you may have noticed, e-mail messages use a sort of HTML-like syntax. But it seems that the only tags that actually work are the <P> tag and the <COMMENT> tag. Others such as <B>, <I>, <U>, <DC>, and <JC> seem to have no effect.

Anyway, the <P> tag works sort of like a paragraph tag in HTML. Each section after the <P> will be grouped together. A line with just a <P> on it will be a blank line. The Comment tag lets you put comments to yourself in your message that the player won't see. You probably won't need that unless you start losing track of which e-mail messages go where. To add a comment, put a <COMMENT> tag in front of the comment, and a </COMMENT> tag after it. For example, this would not show up in the game:

<COMMENT>Remember to pick up eggs on the way home from work.</COMMENT>

Now, go ahead and create another e-mail message (make something up) and save the file as 16_Email02.txt in the same folder that you did above.

3. Create an e-mail menu (or menus)

To get your e-mails to work, you'll have to create another file for each user name that will be receiving e-mail messages. This file will define the "To", "From", "CC", and "Subject" values as well as which e-mails go to which user. So create a new text file and put this in:

<EMAIL=16_Email01,Presentation,NKidman,stack,BPage>
<EMAIL=16_Email02,Weekly Report (saved),JAllred,stack,>

Save this file as 16_EmailMenu_stack.txt. Again, this is the naming convention mentioned in the SDK docs (the "stack" part is the user name). Each line in this file corresponds to one e-mail message.

Up to five values can be put in after the "EMAIL=" for each line in your e-mail menu. The values in order are: e-mail identifier, Subject, From, To, and CC (carbon copy). The e-mail identifier must match the e-mail filename, but without the .txt extension. The "To" value is also important, since it needs to match the user name that the player logged in as. The Subj, From, and CC values can be any text, including none at all.

Now, if the player logs into a personal computer as "stack" (or whatever account you set up), he or she will see something like this:

Notice how the From, To, Subj, and CC values match up with what you put in the E-mail Menu file.

4. Create an import file

Here's part of where the "fixed" SDK comes into play.

Pull up Notepad and type (or copy & paste) this text in:

class TextImport expands Object
abstract;

// Import Text Files
#exec DEUSEXTEXT IMPORT FILE=text\16_Email01.txt
#exec DEUSEXTEXT IMPORT FILE=text\16_Email02.txt
#exec DEUSEXTEXT IMPORT FILE=text\16_EmailMenu_stack.txt

(follow this same pattern for any additional text files you create)

Save this file as TextImport.uc in your \DeusEx\MyPackage\Classes folder. You can call your class something else as long as the class name and filename match. This file can also contain the import statements for your DataCubes, books, newspapers, and bulletins.

5. Build your package

Now you'll need to build a new MyPackage.u file. Get out of UnrealEd if you're in it and then pull up a MS-DOS command prompt and CD to your \DeusEx\System folder. If you've built your package before, go ahead and delete MyPackage.u. Now type in "ucc make". When it's done, you should have a new version of MyPackage.u. If you did it right, the text files you created will now be embedded into your MyPackage.u file.

6. Add a DeusExLevelInfo item

This one's important. If you haven't yet added a DeusExLevelInfo item to your map, you'll need to do that now, so fire up UnrealEd if you need to. The DeusExLevelInfo is available under Info in the Class Browser. Add it, right-click on it, pull up its properties, and expand the DeusExLevelInfo category. Fill in the missionNumber with the number of your, uh, mission. Since you'll be using the latest version of ConEdit, you can use any mission number from 16 to 97, but please note that you'll want to change all of the references in this tutorial to "16" to whatever number you choose.

7. Add the ComputerPersonal item to your map

Add a ComputerPersonal item to your map, which is available under Decorations -> DeusExDecorations -> ElectronicDevices -> Computers. You'll usually want to build a desk or something out of brushes for the computer terminal to sit on.

8. Set up user accounts

Up to eight user accounts can be created on each computer. See Setting up Computers for the details. You'll be referencing these user names in your e-mail menu files. If you're following this tutorial "to the letter", create an account with a user name of "stack". Otherwise, replace any references that I make to "stack" with the user name you set up.

9. Set up TextPackage value

Here's the other thing related to the fixed SDK. While you're messing around setting the properties of your personal computer, be sure to set the TextPackage value to MyPackage (or whatever you called your package).

10. Set up "Special Options" (optional - hehe)

You can also set up special buttons that appear when the user logs in, which can trigger all sorts of things in your map. A personal computer in your map could have only e-mail, only special options, or both. If it has both, a button will appear to allow the player to toggle back and forth.

Up to four buttons can be set up. Which buttons show up depend on which user name the player is logged in as. Right-click on your ComputerPersonal item in your map and pull up its properties. Expand Computers -> specialOptions. The "Text" value is the label that will appear on the button, "TriggerText" is a message that will appear in the Special Options window when the button is pressed, and "userName" is the account that is required for the button to show up. As you can guess, fill in TriggerEvent to specifiy an event to trigger, and/or an UnTriggerEvent to disable something. If you have no idea how to do event triggering or untriggering, don't worry about for now. That will probably involve a future tutorial.

For these settings (the third button is for userName "Bob"):

The player will see this when logged in as "stack":

Now play your map, log into the personal computer as "stack" (or whatever you set up), and try it out!


How to add a public computer

How to add a public computer (and set up bulletins)

Prerequisites:
The Basics
Adding a personal computer

Overview:
Public computers in Deus Ex are nothing more than high tech bulletin boards. Bulletins tend to be "back story" oriented and are generally more for flavor than directly related to gameplay.

1. Add the ComputerPublic item to your map

Add a ComputerPublic item to your map, which is available under Decorations -> DeusExDecorations -> ElectronicDevices -> Computers. This tutorial assumes that you've already gone through Adding a personal computer, so this one won't be quite as detailed.

2. Create bulletins

You can create as many bulletins as you'd like to. Each one will be a seperate text file that you can edit with Windows Notepad or whatever.

To create a bulletin, pull up Notepad and type (or copy & paste) this text in or something similar:

<P>Welcome
<P>
<P>Welcome to Page BioTech, a subsidiary of Page Industries.  Non-authorized personnel will be shot on sight.  Have a nice day.

Save the file as 16_Bulletin01.txt into your \DeusEx\MyPackage\Text\ folder. You can also save your text files in subfolders, as long as they are somewhere *under* the \Text folder. The naming convention for the filename is the mission number, followed by "Bulletin", and then a sequential number, as mentioned in the SDK docs.

As you may have noticed, bulletnins use a sort of HTML-like syntax. But it seems that the only tags that actually work are the <P> tag and the <COMMENT> tag. Others such as <B>, <I>, <U>, <DC>, and <JC> seem to have no effect.

Anyway, the <P> tag works sort of like a paragraph tag in HTML. Each section after the <P> will be grouped together. A line with just a <P> on it will be a blank line. The Comment tag lets you put comments to yourself in your message that the player won't see. You probably won't need that unless you start losing track of which e-mail messages go where. To add a comment, put a <COMMENT> tag in front of the comment, and a </COMMENT> tag after it. For example, this would not show up in the game:

<COMMENT>Remember to pick up eggs on the way home from work.</COMMENT>

Now, go ahead and create another bulletin (make something up) and save the file as 16_Bulletin02.txt in the same folder that you did above.

3. Create a bulletin menu

To get your bulletins to work, you'll have to create another file called a "bulletin menu". This sets up a set of bulletins that can be accessed from a public terminal.

<COMMENT>Office Bulletins</COMMENT>
<FILE=16_Bulletin01,Welcome>
<FILE=16_Bulletin02,TPS Cover Sheets>

Save this file as 16_BulletinMenu.txt. Again, this is the naming convention mentioned in the SDK docs. Each line in this file corresponds to one bulletin.

The format of the FILE= lines is quite simple. The first value is the filename of the bulletin (without the .txt) and the second value is the name of the bulletin that the player will see in the list of bulletins.

Now, if the player right-clicks on any public computer, he or she will see something like this:

4. Add import statements to your import file

Since you've already followed the Adding a personal computer tutorial, you already know how to set up a text import file. Create one or add import lines to an existing one in the Classes folder of your package to import your text files. For this example:

class TextImport expands Object
abstract;

// Import Text Files
#exec DEUSEXTEXT IMPORT FILE=text\16_Bulletin01.txt
#exec DEUSEXTEXT IMPORT FILE=text\16_Bulletin02.txt
#exec DEUSEXTEXT IMPORT FILE=text\16_BulletinMenu.txt

This one would be called TextImport.uc and could contain other import statements for your e-mail, DataCube, books, and newpapers.

5. Associate bulletin menu to a public computer & point to your text package

Right-click on one or more public computers in your map and pull up properties. Under ComputerPublic just fill in the name of the bulletin menu file (without the .txt) for the bulletinTag value and remember to set the Computers -> TextPackage value to the name of your package.

6. Build your package

As described in How to add a personal computer, rebuild your package so that your text is built into a new MyPackage.u or whatever.

That should do it! Give it a try.


How to add DataCubes, books, and newspapers

Prerequisites:
The Basics
How to add custom packages
Download the latest version of the SDK

Related:
Adding a personal computer
Adding a public computer

Overview:
DataCubes, books, and newspapers are all set up the same way. If you've already followed the Adding a personal computer or Adding a public computer tutorials, you'll already be familiar with most of these steps.

NOTE: Though setting up all three of these objects works the same way, in the game DataCubes have one additional feature. Any text in a DataCube is automatically added to the player's notes when it is read.

ANOTHER NOTE: As as March 2, 2001, you can build text into your own packages, rather than overwriting DeusExText.u. You must use the latest (and probably final) version of the Deus Ex SDK for that to work. You can get it here as of this writing.

1. Create a folder called "Text"

First of all, this tutorial will describe how to build the text you write into your *own* package. If you aren't familiar with setting up your own packages, please follow How to add custom packages.

You will create the text for each of your DataCubes, books, and newspapers in separate text files. A decent convention to follow is to create a folder called "Text" under your package folder for keeping these, so go ahead and do that. You can also get fancier, such as creating subfolders under that and so on.

For this tutorial, whenever you see "MyPackage" just substitute the name of your package.

2. Create text files

You can create as many books, newspapers, and DataCube messages as you'd like. You'll create each one as a separate text file.

To create a DataCube message, pull up Notepad and type (or copy & paste) this text in or something similar:

<P>2501. That can be our secret password.
<P>
<P>Major Kusanagi

Save the file as 16_DataCube01.txt into your \DeusEx\MyPackage\Text folder. The naming convention for the filename is the mission number, followed by "DataCube", and then a sequential number, as mentioned in the SDK docs.

To create text for a book, create a file called 16_Book01.txt and put this text in (or whatever), and save it in the same folder as above:

<P>`Please, then,' said Alice, `how am I to get in?'
<P>
<P>`There might be some sense in your knocking,' the Footman went on without attending to her, `if we had the door between us. For instance, if you were INSIDE, you might knock, and I could let you out, you know.' He was looking up into the sky all the time he was speaking, and this Alice thought decidedly uncivil. `But perhaps he can't help it,' she said to herself; `his eyes are so VERY nearly at the top of his head. But at any rate he might answer questions.--How am I to get in?' she repeated, aloud.

To create text for a newspaper, create a file called 16_Newspaper01.txt and put this text in (or whatever), and save it in the same folder as above:

<DC=255,0,0>
<P><JC>G7 Says Growth on Track</JC>
<P>
<P>The Group of Seven rich nations on Saturday shrugged off a dimming outlook for world growth, and new U.S. Treasury Secretary Samuel Armstrong fought off speculation his country might end its "strong dollar" policy.

Though, like e-mail messages and public bulletins, the <B>, <I>, and <U> tags seem to have no effect, in the case of DataCubes, books, and newspapers, the <DC> and <JC> tags are actually functional.

Here are the different HTML-like tags that you can use:

The <P> tag works sort of like a paragraph tag in HTML. Each section after the <P> will be grouped together. A line with just a <P> on it will be a blank line.

The <DC> tag is used to change the text color of the next line. (maybe it stands for "draw color"?) The values after DC= are the red, green, and blue values, which together define the final color. For instance, <DC=255,255,0> will cause the next line of text to be yellow. Personally, I would avoid using this, since colored text looks sort of cheesy in my opinion.

The <JC> tag is for centering text. (maybe it stands for "justify center"?)

The <COMMENT> tag lets you put comments to yourself in your message that the player won't see. You probably won't need that unless you start losing track of which e-mail messages go where. To add a comment, put a <COMMENT> tag in front of the comment, and a </COMMENT> tag after it. For example, this would not show up in the game:

<COMMENT>Remember to pick up eggs on the way home from work.</COMMENT>

3. Create an import file

Here's part of where the "fixed" SDK comes into play.

Pull up Notepad and type (or copy & paste) this text in:

class TextImport expands Object
abstract;

// Import Text Files
#exec DEUSEXTEXT IMPORT FILE=text\16_Datacube01.txt
#exec DEUSEXTEXT IMPORT FILE=text\16_Book01.txt
#exec DEUSEXTEXT IMPORT FILE=text\16_Newspaper01.txt

(follow this same pattern for any additional text files you create)

Save this file as TextImport.uc in your \DeusEx\MyPackage\Classes folder. You can call your class something else as long as the class name and filename match. Your import statements for e-mails and bulletins can also go in this file.

4. Build your package

Now you'll need to build a new MyPackage.u file. Get out of UnrealEd if you're in it and then pull up a MS-DOS command prompt and CD to your \DeusEx\System folder. If you've built your package before, go ahead and delete MyPackage.u. Now type in "ucc make". When it's done, you should have a new version of MyPackage.u. If you did it right, the text files you created will now be embedded into your MyPackage.u file.

5. Add the DataCube, book, and/or newpaper items to your map

Now it's time to actually add the items to your map. These are available under Decoration -> DeusExDecoration -> InformationDevices. Right-click on them and set their textTag values under InformationDevices to the name of the appropriate text file (without the .txt) and set their TextPackage values to MyPackage (or whatever you called your package):

You can also fill in the name of a DataVault image to give to the player when the information device is read by setting the imageClass value. Though you would normally create your own DataValue image for your own maps, if you want to see how it works, expand Inventory -> DataVaultImage and click on one of the items. Then click in the imageClass value in one of your information devices and press the Use button.

That should do it! Give it a try.


How to get the mission startup text to show up

Prerequisites:
The Basics

Summary:
Each distinct mission in Deus Ex starts with text displaying in the middle of the screen telling you where you are. If you don't have a script attached to your DeusExLevelInfo item, you won't see this text in your own levels.

Some knowledge of packages is helpful for this. It may be useful to find information on adding your own custom packages before going on, but I will try to cover everything, if briefly.

NOTE: This tutorial is based on a post by "campers" on the Ion Storm SDK forum.

1. Set up a custom package if necessary

If you aren't already using your own custom package with your map, you'll need to set that up. Since you'll need to do that anyway if you want any conversations to work, it's a good idea.

If you need to set up a new package, first pull up the DeusEx.ini file in your \DeusEx\System folder. Add a line at the end of the [Editor.EditorEngine] section like this:

EditPackages=MyBitchinMap

...where "MyBitchinMap" is the name of your new package. You can use this same package for your conversations, custom textures, and custom meshes.

Create a folder under \DeusEx called MyBitchinMap (or whatever you called your package), and under this new folder, create a folder called Classes. If you ever mess with creating custom meshes, you'll also have a folder under MyBitchinMap called Models.

2. Create a script file

Now create a new file with Notepad or your favorite text editor and call it MyMissionScript.uc (or something else, as long as you keep it consistent). Save this under your Classes folder. Type this in as the contents of the file:

//=============================================
// MyMissionScript.
//=============================================
class MyMissionScript expands MissionScript;

function InitStateMachine() {

    super.InitStateMachine();
    FirstFrame();

}

3. Compile your package

If you have UnrealEd running, close it now. Pull up a DOS Prompt and CD to your \DeusEx\System directory. If you're using an existing package, remember to delete the .u file now. Type in "ucc make" and wait for it to run. If everything worked, you should get a Success - 0 error(s), 0 warnings message. You should also get a new file called MyBitchinMap.u. This is your custom package which now contains a new script. Every time you need to rebuild MyBitchinMap.u, you'll need to exit out of UnrealEd, delete the file, and run "ucc make".

4. Update your DeusExLevelInfo item in your map

Fire up UnrealEd and load in your map. If your map has been properly set up, you've already added a DeusExLevelInfo item. This is required for conversations to work anyway, so be sure to always add one to every map you create.

If you need to add it, expand the Info category in the Class browser and select DeusExLevelInfo. Place it somewhere in your map. It's a good idea to place it near your starting location to make it easier to find later.

Find your DeusExLevelInfo item in your map (it looks like this: ) and pull up its properties sheet.

Go to the Class browser and expand Info and MissionScript. Your new script (such as MyMissionScript) should show up in the list. Select it and return to the DeuxExLevelInfo properties sheet. Expand the DeusExLevelInfo category and select Script. Push the Use button and your script name should be pasted in. You can also just type in in as shown above. In this example, "MyBitchinMap" is the package name, and "MyMissionScript" is the class.

Now all you have to do is set the text to display. Expand the startupMessage item and type in up to four lines of text that the player will see at the start of the mission.

IMPORTANT: if you fill in the MapName value, do NOT use any spaces. You'll get an error when the level starts.

Save your level, and check it out!


More Fun with Zones

Prerequisites:
The Basics
How to add water

Summary:
If you want to do stuff like define water areas, mess with gravity, and add fog, you can define "zones" in your map using Zone Portals and use the ZoneInfo actor to set up what special behavior you want in each zone. Water zones, sky zones, and pain zones are covered specifically in other tutorials, so this one will cover some of the less common things you can do. To set up the behavior of a zone, you just change the properties of its ZoneInfo.

Download example map (19K), unzip and copy to your \DeusEx\Maps folder

1. Make or find an area for your zone

The first step is to determine where your special zone is going to be. You'll need to either create new geometry for the zone, or find an existing location. You zone will need to be "sealed off" with special 2D brushes called Zone Portals in the next step, so think about how you want to seal off your zone.

Here are some of the things you can do:

* Raise or lower the gravity
* Lower the ground friction to make the floor slippery
* Change the ambient lighting
* Create foggy areas
* Create areas that push the player along (to simulate a windy tunnel perhaps)
* Create water
* Change the speed of texture panning
* Create "pain zones"

2. Move/size sheet brushes and define the zone boundaries with Zone Portals

Change the red selection brush to a 2D sheet by pressing the Build a Sheet button: (bottom button in the third column). Right-click on it and select Sheet Properties. Make sure "X-Wall" or "Y-Wall" is selected if you have normal upright doorways, and enter size values that will exactly match the width and height of your doorway or other opening. (count grid squares if you have to) If you're creating a Zone Portal to create a large water surface, you don't necessarily have to be that precise. Now move the sheet brush so that it exactly covers your doorway or other opening.

Push the Special Brush button: (fifth button down in the third column). Select "Zone Portal" from the drop-down list:

Hit "Add Special", and you should get a brand new green brush exactly covering your opening.

Repeat this step for any openings in your room that lead to areas outside your zone.

3. Check zone boundaries

Now hit F8 and Rebuild Geometry. If you've done Step 2 correctly, you will have a new zone. On the Rebuilder window, you should see the Zones value increase (should be at least one higher).

In the 3D view, click the little arrow button to bring down the menu bar. (it looks like this: ) Select Zone/Portal View from the Mode menu. You are now seeing the zones in your map color-coded. In this example, this green hallway has been "zoned":

Make sure your zone is a different color from the areas next to it.

4. Add and set up a ZoneInfo item

Expand Actor -> Info in the Class browser to get to the ZoneInfo item. Add a ZoneInfo item somewhere inside of your zone. Now pull up the properties for your ZoneInfo. At this point, it's just a matter of setting the various value, depending on what you want to do. You can generally mix and match settings to combine effects if you need to.

Fog

Set ZoneInfo -> bFogZone to True. You'll also need to set the ZoneLight -> FogDistance value to a small number, such as zero.

Gravity

Set ZoneInfo -> bGravityZone to True. Change the X, Y, and Z values under ZoneInfo -> ZoneGravity to alter the zone's gravity. To make the player lighter, increase the Z value. Be careful not to set it to zero or higher, since the Deus Ex gameplay interface isn't really designed to handle zero gravity!

Ambient light

You can finely control the ambient light settings within a zone by using the AmbientBrightness, AmbientHue, and AmbientSaturation values under ZoneLight. These three values are the normal light values that you would use in a light actor. Click here for a quick and dirty color chart.

Water

While you may end up using the WaterZone actor to define a normal water area, you can also simply set the ZoneInfo -> bWaterZone of a ZoneInfo to True. It's important to know that there's nothing special about the WaterZone other than that setting. That setting can be combined with many of the other effects.

Ground friction

To make a slippery floor, set the ZoneInfo -> ZoneGroundFriction to a lower value. A value of 0.1 makes it quite slippery.

Velocity

It's possible to "push the player along" by changing the X, Y, and Z values under ZoneInfo -> ZoneVelocity. If you set the Y value to say, 300, you could simulate a windy tunnel with the wind blowing along the Y-axis.

Texture panning speed

The U-Pan and V-Pan properities of a brush surface allow you to "scroll" (pan) textures across a brush. You may want to use those setting in a sky zone to simulate overhead cloud movement, for example. You can control the speed that the textures pan by setting the ZoneLight -> TexUPanSpeed and ZoneLight -> TexVPanSpeed. Note than in the case of a sky zone that you already have a SkyZoneInfo item where these values can be changed. But you're certainly not limited to sky zones.

There are a number of other values in the ZoneInfo that can be set, so experiment!


Patrol Points

Prerequisites:
The Basics

Overview:
This will show you how to put guards on patrol. It's easy!

1. Place the first patrol point

Expand Actor -> NavigationPoint, select PatrolPoint, and add one to your map where you'd like your patrol route to begin. It will look like this: in the editor. You should use the "hold down the 'A' key and left click" method when adding any type of navigation point to your map. (all of the types of NavigationPoint's are used to form Unreal "Paths" - it's important that they all be the same height from the ground) The red arrow coming out of the PatrolPoint symbol indicates which direction the NPC will face at that point.

Pull up its properties and give it a Tag value (under Events). Each PatrolPoint will be linked to another one, so you might want to end the name with "01" or something to indicate that this is the first one.

Now expand the PatrolPoint category and fill in the Nextpatrol value with the name of the next patrol point (you'll add that one in the next step). Ending the name with "02" or "2" wouldn't be a bad idea.

You can also specify a pausetime (in seconds) if you want the NPC to pause for a while at this patrol point.

2. Place the remaining patrol points

Now place your second patrol point and set its Tag value to the Nextpatrol value you set in Step 1. If you want a third patrol point, set the Nextpatrol point to that, and so on. Most of the time you'll want to set the final Nextpatrol value to the Tag name of your first patrol point to form a loop. That way your guard will continuously walk his patrol route. You can get by with as few as two total patrol points, as in this example.

3. Run "Paths Define"

This part isn't too intuitive if you've haven't used "path nodes" yet, but fortunately it's quite easy - it just requires you to push a button. In order for any type of "navigation points" to work, we need to tell UnrealEd to actually build the paths.

NOTE: As mentioned in the SDK docs, navigation points should be less than 700 Unreal units apart and need to be within line-of-sight of each other.

Press F8 to bring up the Rebuilder and go to the Lighting tab. Now just hit the Paths Define button.

To see if your navigation points (in this case, patrol points) are being properly connected, use the [image] button in the overhead 2D window to bring down the menu bar and select Show Paths from the View menu. You should then see a black line connecting each of your patrol points.

4. Place the NPC and set orders

Now add your guard. Any NPC under Actor -> Pawn -> ScriptedPawn will do. You can use Soldier under HumanMilitary if you just want a generic guard. Add your NPC near your first patrol point. Pull up its properties and expand the Orders category.

Set the Orders value to Patrolling and the OrderTag value to the Tag name of your first patrol point.

Now when you play your map, the NPC you added should follow your patrol route.


Interpolation points

Interpolation Points and Interpolation Triggers

Prerequisites:
The Basics

Summary:
Ever wonder how to get Jock's black helicopter to take off after a mission? Or how the little boat in the Hong Kong canals was set up to move around? The answer is "Interpolation Points". While that may sound scary or technical, they are just items that you add to your map to define paths for objects to follow. You can set up a sequence of these (numbered 0 through whatever) and the Unreal engine will fill in ("interpolate") points in between to make the motion nice and smooth. In this tutorial, we'll make the little Hong Kong boat move around in a circle.

Download example map (36K) - walk toward the boat and it will start moving along some interpolation points

NOTE: Getting Jock's helicopter to take off after a mission (or something similar) is beyond the scope of this tutorial, but understanding interpolation points is the most important step. Stay tuned for a MapExit tutorial that fully explains how to transition from one map to another with a "cinematic".

1. Place the object to move

You can use anything you want, but for this example, let's move a boat around. Under Actor -> Decoration -> DeusExDecoration -> HongKongDecoration select HKTukTuk, and add it to a map. If you don't have any water in your map, you can choose something else, such as the BlackHelicopter or Van, though it doesn't really matter too much.

Pull up the HKTukTuk's properties and set its Events -> Tag value to Boat.

2. Place the main interpolation points

In the Class browser under Actors -> Keypoint, select InterpolationPoint. Now start placing InterpolationPoint's to define where the boat will go. They look like this: in the editor. Don't be skimpy with them - the example map I made uses 35 of them. The more points you have, the more accurately you'll be able to shape the path the way you want. I used three InterpolationPoint's for most of the turns.

I would recommend adding InterpolationPoint's very close to each other for the first three points. Otherwise you'll get some weird jerky motion when the object starts moving.

Set each InterpolationPoint's Events -> Tag value to Boat. Set the first point's InterpolationPoint -> Position value to zero, the second one to 1, and so on. The RateModifier can be used to speed up or slow down the object as it moves through a particular point. Higher values cause the object to go faster.

Once you have placed the points roughly where you want them (don't bother tweaking until they are all placed), rotate them so that the red arrow points in the direction you want the boat to go. It's not quite as simple as that though.

While the arrow is a good guideline, the way to see what kind of movement you're really going to get is to look at the sets of red, blue, and green lines that are displayed along the motion path. When you click on any InterpolationPoint of a path, the path itself will display as a white line, and a number of "axis" markers will display along the path. Each "axis marker" shows how the object's pitch, bank, and heading (or, in Unreal-speak, pitch, roll, and yaw) will change as it moves along the motion path. You'll notice that the motion path doesn't necessarily pass through each interpolation point; each point only has an *influence* on the motion path.

NOTE: If you're defining the path of a flying object, like the helicopter, it's helpful to realize that you can move and rotate the InterpolationPoint's any way you want to in three dimensions. The red arrows can be used to control the pitch, bank, and heading of the object you are moving.

3. Set up the final interpolation point

Pull up the properties of the final interpolation point and set its InterpolationPoint -> bEndOfPath to True. Also, set InterpolationPoint -> bSkipNextPath to True, since we want the motion to start over again each time the boat completes its path.

You'll notice in my example map that the boat does a little reverse loop at the end. That's because by the end of the path, the boat has rotated 360 degrees. If that little loop to spin the boat back around was not done, when the loop repeats, the boat would have quickly rotated from 360 degrees back to zero. It's a bit hard to explain, so you may need to experiment to fully understand that. Anyway, if you look at the 06_HongKong_WanChai_Canal.dx map, and look at the path of the moving boat (the boat is hard to miss with all those red lines coming out of it), you'l see that it does a large "figure 8". That allows the boat the cover a large area while neaty avoiding the "spin out at the end of the path" issue.

4. Place the interpolation trigger

In order to get the boat moving, we'll have to use a trigger. Under Actor -> Triggers -> Trigger, select InterpolateTrigger and add one to your map where the player will be able to walk. Set its Events -> Event value to Boat. You can also bump up the Collision -> CollisionRadius if you want a larger radius.

Now when the player walks within the collision radius of the trigger, the boat will start its motion. It may look weird at first, so now's the time to tweak to your heart's content.

NOTE: You can also fire an InterpolateTrigger from a ConEdit trigger event, from a mission script, or from another trigger such as a Dispatcher. That last option is useful when doing end-of-level cinematics using the MapExit item.


Visible Light Beams

Prerequisites:
The Basics

Overview:
A few people have asked how to do "visible" light beams as seen in a few custom maps built with UnrealEd. One approach is to simply model the beam as a brush and apply what is known as a "gradient" texture to it in a way that will simulate a beam of light gradually fading out as it gets further from the light source.

Creating the brush in the shape you want is probably the trickiest part. I kind of cheat and use Lightwave to create the shape, export the model as a .DXF file, then import it as a brush in UnrealEd. If you'd like an example brush to get started, I've provided the .DXF file I used in this example. I've also provided a sample gradient texture for a yellow beam.

Download:
Example light beam .DXF model (2K)
Example light beam texture (3K)

1. Build the light beam brush

First you'll need to build the brush. Use UnrealEd creatively or use an external 3D package to build a solid brush in the shape of your light beam and place it into position. For this example, you can import the above .DXF file as a brush by selecting Import off of the Brush menu in UnrealEd. Rotate and move it into position and hit Add Brush to World.

The green wireframe in this picture is what the example light beam looks like:

2. Make the brush non-solid

Since a light beam is not a solid object, you'll want to make the brush into a Non-solid brush. Not only will that allow a player to walk through the beam, I assume that non-solid brushes are more efficient, since there's no collision detection to calculate.

Right-click on your brush and select Solidity -> Make Nonsolid. The brush will turn from blue to green in the editor.

3. Create and apply a gradient texture

To get the effect we're looking for, we'll use what's called a gradient texture. That just refers to a texture that smoothly changes from one color to another. If you have access to Photoshop, there's a handy gradient tool for doing just that. Since the texture will be repeating horizontally, there's no need to make it very wide. I would recommend making the texture 128 pixels high (or higher) to get the smoothest transition. Make one of the colors black and the other the color you want your beam to be, such as white or yellow. After you've done Step 4, the completely black parts of the texture will cause the brush surface to be transparent and the in-between colors will be translucent.

To get you started, I've provided an example yellow-to-black .PCX file (see link at the top of the page). It looks like this:

You will have to either add your texture to a .UTX texture package or import it into a .U package. See How to add custom textures for details on how to do that.

Once your texture is imported and available in the UnrealEd texture browser, apply the texture to your brush. If you're using the example brush, you'll need to use the Align Selected -> Align Wall Direction option and scale the texture so that the texture is scaled as small as possible without repeating vertically. I used a scaling factor of 0.6 for this example. Make sure the yellow end is up and the black end is down.

4. Set brush properties

Now select all of the brush surfaces and set them to Unlit and Translucent. Unlit will make the beam "light up" like you'd expect and Translucent will make the darker areas of the texture more transparent. Black will be completely transparent.

You can also experiment with setting the surfaces to "2-Sided". That will make the beam a bit more three dimensional, allow the player to still see it while standing inside of it, and make it appear brighter. With the texture I used here, I thought that made it a little too bright, so I left the surfaces 1-sided.

NOTE: If your brush shape has surfaces at both ends or any surfaces you don't want to show up, be sure to set them to Invisible.

That's about it. Here's how my light beam example turned out in a little test map:


Future Beyond Basic Mapping Topics

Possible future "Beyond Basic Mapping" topics

Invisible collision hulls
Triggers: GoalCompleteTrigger and SkillAwardTrigger
Triggers: SpecialEvent (triggering sounds, messages, and damage)
Triggers: FlagTrigger
Triggers: LogicTrigger
Triggers: SenseTrigger (do you have the key?)
Navigation points (Path nodes, hide points, home base)
Controlling NPC behavior: Orders and order triggers
Controlling NPC behavior: AI, Combat, Fears, Reactions, and Stimuli settings
Particle generators and Effects (displaying electricity, gas, fire, smoke, sparks, water drips)


Intro to ConEdit: Making Basic Conversations

Prerequisites:
The Basics
 How to add custom packages
Download the latest version of the SDK

Overview:
A crucial element in Deus Ex is conversations with characters. To set up conversations, you use one of the programs that comes with the Deus Ex SDK called ConEdit. With ConEdit, you can set up simple or complex conversations, including InfoLink messages, multiple-choice decisions, as well as giving the player new goals, transferring items to the player, and all sorts of other stuff.

To get the ball rolling, let's create a simple conversation.

NOTE: You may also want to check out Jered's excellent ConEdit tutorials here and the comprehensive set of ConEdit tutorials over at Universal Constructor. Also, be aware that much of ConEdit actually *is* documented in the ConEditDocumentation.doc file that comes with the SDK.

1. Create an import file

You will need to use your own package in order to use ConEdit. If you don't know how to do that, please follow the How to add custom packages tutorial first. Whenever you see "MyPackage" in this tutorial, just replace that with the name of your package.

The first step is to create an import file to tell the Unreal compiler which conversation files to read in. The compiler will read the ".con" files that you make in ConEdit and create a couple of special files that are needed for your conversations to work in the game.

So create a new text file called ImportConversations.uc and save it in your \DeusEx\MyPackage\Classes folder. Here's what to put in the file:

class ImportConversations expands Object
abstract;

// Import conversations
#exec CONVERSATION IMPORT FILE="Conversations\Mission70.Con"

You will have a "CONVERSATION IMPORT" line for each .con file you want to import. For now, let's just start with one .con file. In this example, I'm assuming that you'll be setting up a .con file that is associated with "mission 70", but you can use any number from 16 to 97 for your missions.

Also, in this example, the .con file would be stored in the \DeusEx\MyPackage\Conversations folder. So if you want to follow this tutorial exactly, be sure to create a folder called Conversations under your MyPackage folder.

NOTE: Importing conversations into your own files was not possible with the original version of the SDK. Be sure to download and install the latest version of the SDK if you haven't already.

2. Create a new conversation file in ConEdit

Fire up ConEdit. If this is the first time you've used it, it may ask you to fill in some stuff, so be sure to at least put in a Username. It's not important, just fill something in or ConEdit will yell at you later. Take the defaults for everything else.

Now create a new .con file. Just hit File -> New or the New Document button. Before you can go on, you'll need to pick at least one mission number to associate with your .con file and you'll need to fill out a value called Audio Package. For this example, scroll to Mission 70 and hit the "<-- Add" button.

Hit the Misc tab, and type in "Mission70" (with no spaces) for the Audio Package. This can actually be anything you want. This value will be appended at the end of your audio filename, so you'll eventually get a filename like MyPackageAudioMission70.u for your "audio package" with these settings.

3. Create a conversation

Under the Conversation menu, select Add Conversation. Let's set up a brief conversation between the player (JC Denton) and Tracer Tong. For the Conversation Name value, type in "MeetTong" and for the Conversation Owner value, type in "TracerTong". You don't want any spaces. The Conversation Owner must exactly match the "bind name" of the character you are referring to. I'll explain bind names in more detail later, but in practice it's usually just the character's name without any spaces. Be sure to type it in correctly!

When you add a new bind name to a .con file, you'll get this:

Hit "Yes". This will add the bind name to the character drop-down lists, so you won't have to type it in again (for this .con file anyway). It's cool, because you only have to scroll through the names in your file, instead of dozens of them. ConEdit will categorize your conversations by Conversation Owner, which is pretty handy.

Don't worry about the settings in the other tabs; just take the default values. I'll cover that stuff in later tutorials.

4. Create some dialogue (speech events)

With "MeetTong" highlighted, select Add -> Speech from the Events menu. Select TracerTong from the Actor to Speak drop-down and type in "JCDenton" for the Speaking To value. Hit "Yes" when it asks if you want to add JCDenton to the list. Make up something for Tracer Tong to say to the player, and type that in the Speech area.

Now hit the Update button. Hit the Add Event button to prepare for a response from JC. Notice how the "Actor to Speak" and "Speaking To" values have flipped? Since we're normally using this window to set up dialogue between two characters, that feature can come in handy. Make up some witty dialogue for JC's response and hit Update. The Speech Event will NOT be added to the conversation until you hit Update. Continue adding as many speech events between the two as you'd like to. When you're done, select Add -> End from the Events menu.

Hit File -> Save (or the Save button) and save your file as Mission70.con in your \DeusEx\MyPackage\Conversations folder.

5. Rebuild your package and conversation files

Now it's time to rebuild your package. You're done with ConEdit for now, so close it if you want to. Get out of UnrealEd if you're in it. Pull up an MS-DOS command prompt and CD to your \DeusEx\System folder. Delete your package (MyPackage.u) if you've built it before and type in "ucc make". If you have your .con file in the right place and your import file set up correctly, you should now have three new files in your \DeusEx\System folder:

MyPackage.u
MyPackageAudioMission70.u
MyPackageText.u

The first is just your normal package containing your .uc files, textures, DataCube text, meshes, etc. The second file is for recorded dialogue in MP3 format. Don't worry about that for now - I'll cover recorded audio later. The third file contains the text of the conversations.

NOTE: The next time you need to re-import your .con files, you'll only need to delete MyPackage.u - the other files will be overwritten.

6. Set up your DeusExLevelInfo properties

Fire up UnrealEd and either make a simple map (a one room cube is fine) or pull up an existing map. If your map doesn't have a DeusExLevelInfo item, you'll need to add one now. That's available under Actor -> Info in the Class browser. There are two properties that you'll need to set. Expand the DeusExLevelInfo category, put the name of your package in the ConversationPackage value, and fill in the missionNumber. The ConversationPackage is the name of your regular package, not the MyPackageText or MyPackageAudioMission70 packages.

7. Add an NPC and try it out

For this example, add a TracerTong to your map. He's available under Actor -> Pawn -> ScriptedPawn -> HumanCivilian. (scroll down to the last choice) Make sure your PlayerStart is close or you'll be doing a lot of walking.

While you've got TracerTong selected, now's a good time to mention the BindName value. This is for extra credit, but if you want, right-click on the TracerTong item in the Class Browser and select "Default TracerTong Properties". Expand the Conversation property and you'll see the BindName value is "TracerTong". This value is almost always the same as the name of the character class, but technically that's the value that matches up with what you type in ConEdit.

Run your level and go right-click on Tracer Tong. You should see one of those familiar "third person" conversations.

That's it!

NOTE: If you're going to distribute your map, you'll need to include your MyPackage.u and MyPackageText.u files. Since in this example you don't have any recorded audio, you don't need to distribute the MyPackageAudioMission70.u file.


Future ConEdit Topics

Possible future ConEdit topics

Infolink conversations
Goals, Notes, Skill Points, and Credits
Camera movement
Branching and random speech
Barks
Presenting conversation-based choices
Flags and what to do with them
Getting NPC's to give items to the player
Checking for credits and items
Conversation triggers
Importing recorded conversation audio as MP3 files


How to add custom textures

Prerequisites:
Everything under The Basics
How to add custom packages (for import method 2 only)

Overview:
Adding at least some of your own textures is a must for giving your map a unique look. There are two basic methods for importing them.

1. Create your textures

How you actually create your textures is up to you, but you'll typically want to use one of these products:

Paint Shop Pro costs about $100 and seems to do much of what Photoshop does, at a drastically cheaper price. For creating textures, it should be *more* than enough.
Photoshop usually goes for around $500. If you're lucky enough to have access to this, it is very nice and is an industry standard. I was lucky enough to be able to upgrade to the full version of Photoshop from Photoshop: LE for $100, but since then they've bumped up the price of that upgrade significantly.
Photoshop: LE goes for around $100 and is another good choice. It's a scaled down version of Photoshop, which is cool because you'll be able to follow the many Photoshop tutorials and books that are out there.

There are a number of other photo editing programs that come bundled with scanners, web cams, and digital cameras that may very well do the trick as well. You could theoretically use Windows Paint to create 8-bit BMP files, but you'll be *severely* limited. You could also render images using a 3D animation package. For example, Lightwave has a feature called SkyTracer, which could be used to generate SkyBox textures.

NOTE: There are certain types of effects textures that you create within UnrealEd. I'm not going to cover that topic here, but you can go to Unreal Animating Real-time Textures Manual for more info. These are for creating "algorithmic" animated textures for things like fire, sparks, lightning, and water. They're very cool.

Anyway, even if you initially create textures from scanned-in photographs or from a digital camera, you'll still need to use photo editing software to crop, enhance, and convert the images.

The height and width of your textures need to be "powers of 2." In other words, both the height and the width need to be one of these numbers: 1, 2, 4, 8, 16, 32, 64, 128, or 256. UnrealEd will let you import higher res images (512, 1024, etc), but the Unreal 1 engine will not render those correctly. The height and width do not need to be the same, so a 64 x 32 image is fine.

2. Convert your textures

If your textures are already .BMP or .PCX files in 8-bit color, you can skip to step 3. If not, you'll need to use your photo editing software or an image converter to get them into that format. You want to convert your images to 8-bit (256 colors) and save them as either .BMP or .PCX files.

The procedure for this is different depending on which software you use, but I'll give an example of what I do from Photoshop to give you the basic idea.

If I have a 24-bit color image in Photoshop that is cropped and ready to go, this is what I do:

* Select "Save For Web" from the File menu. Though that is designed for conversion to JPG and GIF files, I find the GIF conversion to be excellent. Since GIF files are in 8-bit color, conversion from GIF to PCX is easy.
* Set output format to GIF and adjust dithering options until I have something that looks decent.
* Pull up the GIF file and then choose "Save As" to save it as a PCX file.

If you have a lot of images you need to convert, you might instead use an image conversion utility. A really excellent Freeware image viewer/converter is called IrfanView. The cool thing is that you can do "batch" conversions of entire folders full of files.

The next step is to actually import your textures.

3a. Import method 1: Using the UnrealEd user interface

In UnrealEd, make sure "Textures" is selected in the Browse drop-down. Press the Import button at the bottom-right of UnrealEd. Select your texture file (or multiple texture files) and then you'll see this window:

The name of the texture will default to the filename (minus the .pcx or .bmp). The first time you import textures, you'll want to create a new texture package that you'll put all of the textures related to your map in. If you're using this method, you'll need to distribute this .utx file with your map. So make up a name for your new texture package - perhaps the same name as your map or some meaningful category - and type that in the "Package" value. You can also create multiple texture packages, but unless you have a huge number of textures, that's not necessary.

You can type something in the Group value to categorize your texture. This is strictly for convenience when selecting textures in the editor, but it's a good idea. Organize your textures into a small number of categories like "Skins", "Weapons", "UserInterface", "Misc", or whatever. Also, if you type "Ladder" as the Group, your texture will act like a ladder in your map.

Don't worry about the Masked check box for now - masked textures will be covered in a separate tutorial. Also don't worry about the bump map option - I'm pretty sure the Deus Ex version of the Unreal engine does not implement bump mapping.

You usually want to keep "Generate Mipmaps" checked; that option will generate a number of smaller versions of your texture that will automatically be used by Unreal 3D engine. The only time it makes sense to uncheck this is for 2D elements like HUD display icons or DataVault images.

Hit Ok or "Ok to All" and then be sure to press the Save button at the bottom of the Texture Browser to actually save your .utx texture package.

3b. Import method 2: Use a .uc file to import the textures into your own package

An alternate method is to use import files to import textures into your own .u package. If you're using your own package anyway, this can be an advantage since that means one less file to distribute. I tend to use this method, but there's no right or wrong way to do it.

For information on setting up your own packages, see How to add custom packages.

Under your package folder, you may want to add a "Textures" folder or something like that.

Create a text file in Notepad or your favorite text editor and type in a texture import line for each texture you want to import. Here's an example of a texture import file:

class Textures expands Object abstract;

// Weapon textures
#exec TEXTURE IMPORT NAME=LaserGunTex1 FILE=Textures\raygun_barrel.pcx GROUP=Skins FLAGS=2

// DataVault images
#exec TEXTURE IMPORT FILE=Textures\Image01_LibertyIsland_1.pcx NAME=Image01_LibertyIsland_1 GROUP=UserInterface MIPS=Off
#exec TEXTURE IMPORT FILE=Textures\Image01_LibertyIsland_2.pcx NAME=Image01_LibertyIsland_2 GROUP=UserInterface MIPS=Off
#exec TEXTURE IMPORT FILE=Textures\Image01_LibertyIsland_3.pcx NAME=Image01_LibertyIsland_3 GROUP=UserInterface MIPS=Off
#exec TEXTURE IMPORT FILE=Textures\Image01_LibertyIsland_4.pcx NAME=Image01_LibertyIsland_4 GROUP=UserInterface MIPS=Off

The value after NAME= is the name that you will reference in UnrealEd. It doesn't have to be the same as the filename. The value after FILE= is the filename. Note that the location is relative to your package folder, so if your textures are in a folder called Textures under your package folder, you'll have to put a "Textures\" in front of the filename. The value after GROUP= is the same as the Group value described in Import Method 1 above.

Save your file as Textures.uc (or whatever you want) in the Classes folder under your package folder. Be sure that the filename matches what's after the word "class" at the top of the file, or you'll get an error when you build your package. You can organize your textures in as many .uc files as you'd like. You can also put texture import statements in with other import statements and even script code if you want to.

There are a couple of optional things you can add to a texture import line. The FLAGS= value is optional. If you don't use a FLAGS value, your texture will be set up with the normal defaults. Here are the valid values you can use:

Texture setting | FLAGS value
Masked | 2
Transparent | 4
Environment mapped | 16
Modulated | 64
Fake Backdrop | 128
Two-sided | 256
Auto U pan | 512
Auto V pan | 1024
No smooth | 2048
Big wavy | 4096
Small wavy | 8192
Water wavy | 16384

Even if you don't set any of these, a surface with your texture on it can still be manually set to any of these later. The "Masked" setting is the most common option.

Another option is the MIPS= value. This works just like the "Generate Mipmaps" option in Import Method 1. If you don't include this, mipmaps *will* be generated. So put MIPS=Off in your import statement if you're importing a 2D element like a HUD icon or DataVault image. (it actually doesn't hurt anything to have the mipmaps generated, but it's a bit of a waste)

To rebuild your package, exit UnrealEd if necessary, delete your .u package file from your \DeusEx\System folder and do a "ucc make" from an MS-DOS command prompt. Fire UnrealEd back up, and your textures will be ready to use.

4. Animated textures (optional)

Importing animated textures is very easy. Creating them is the hard part. I'm not going to go into a lot of detail about how to create animated textures - that's up to you. You could take a few frames from some video footage, render some frames with a 3D package, or manually create individual frames in a paint or photo editing package.

For some examples of animated textures, look at the CoreTexMisc package. There are a variety of textures for using on display screens and video screens, such as the ones starting with "News_A".

Using "Texture Import Method 1" described above in step 3a, import a series of textures for your animation frames (that are the same size). Be sure to put 01, 02, 03, etc at the end of the file names. If you do, UnrealEd will automatically detect the sequence as an animation and assign the correct animation values to each texture.

After the textures import, right-click on the first texture in the sequence (in the texture browser). If your textures imported properly, the Animation -> AnimNext value should be set to the second image in the sequence.

Each "AnimNext" value will point to the next image in the sequence until the last texture, which will not have an "AnimNext" value. If you're not seeing any animation when you play your map, you may want to double-check these values.

You may need to experiment with the frame rate of your sequence. A typical animated texture is around 5 - 20 frames long, so a good starting point is around 5 - 10 frames per second. If you don't change the MaxFrameRate and MinFrameRate values, the frame rate will default to a very fast value, and the animation may play faster than you can see it.

To use an animated texture on a brush (or whatever), just use the first texture in the sequence.

To preview the animated texture "in action" in the UnrealEd 3D view, hit the real-time preview button (it looks like this: )

5. Detail textures (optional)

Detail textures are additional textures that can be "added" to a regular color texture to give it a bit more, uh, texture. They are usually grayscale images that are tiled independently of the main texture and sort of fade in as you get closer to a surface. You could think of them as fake bump mapping, though even that isn't really accurate. They are used to give a texture a bit more depth, such as a stony or metallic surface.

To see an example, load in the HK_VersaLife texture package and select the "cube1" texture. Right-click on it, pull up its properties, and expand the Texture category. Notice that the DetailTexture value is filled in.

Now load in the CoreTexDetail texture and check out the DMetal_A texture. Go ahead and use the cube1 texture in a map to see how it looks. Notice how it changes as you get closer?

The basic idea is to take a base texture and assign it a detail texture. The detail texture gets tiled separately from the main texture, and its scaling and visibility changes with the distance from the player.

The final result looks crappy here since the screenshot is reduced, but in the game it looks pretty decent:

+ [image] =

One thing you can do to if you have a "video display" type of texture is set its DetailTexture value to the CoreTexDetail.DScanline texture. That will give it an "interlaced video" look, though you'd think that in 30 years (or whenever Deus Ex is supposed to be), we'd all be using non-interlaced displays.

You can create your own detail textures; they are just normal textures. For best results, try to make them so they look good when tiled. Also, you may want to make them grayscale, but that's not a requirement.

6. Ladder textures (optional)

As I mentioned briefly, you can make your own ladder textures. If you set the Group value to "Ladder" when you import a texture (using either import method), your texture will act like a ladder in the game. You'd naturally want to use it on a vertical surface. :) For best results, you may want to investigate "masked textures" which I'll eventually be covering.


How to create masked textures

How to create masked textures (in Photoshop)

Prerequisites:
The Basics
Some knowledge of 8-bit color palettes

Overview:
You might need to create textures where some of the texture is transparent. Those are called "masked textures". They can be used on brush surfaces that are set up as masked, on model surfaces where polygons have been marked as masked, or for certain HUD elements like belt icons. Creating Deus Ex compatible masked textures in Photoshop 5.5 or higher is pretty easy.

1. Create the texture with transparent areas

You'll need to use a unique color to fill in the pixels that you want to be transparent. This part works just like setting up transparent areas of a GIF file, if you've ever done that.

A standard choice for which color to use is purple. That is, the RGB value Red=255, Green=0, Blue=255. You can type those values in the R, G, and B fields of the color picker. The color you choose can be anything you want, but the purple color does tend to stand out and makes it very easy to pick the correct color from the palette in Step 2.

At this stage, it doesn't matter if the image is 24-bit color or 8-bit color.

If you'd like to try this without creating a texture, here's an example. Right-click on this image, save the GIF file somewhere, and pull it up in Photoshop.

2. Use the Save for Web option to save a GIF file

In Photoshop, make sure your image is selected, and choose "Save for Web" from the File menu. You want to set the file type to GIF (not JPG) and from the Matte drop-down, select "Eyedropper Color". Click on the eyedropper tool (looks like this: ) and click somewhere on your transparent color in the image. You should see your unique color selected in the color table that Photoshop has generated.

Now just hit OK and save your GIF file.

For those that want to know what's going on here, Photoshop will rearrange the colors in the palette so that your transparent color is the *first* color. It turns out that's exactly what you want. The Unreal/Deus Ex engine will use the first color in the palette as the transparent color.

3. Pull up the GIF file and Save As PCX

Now pull up the GIF file you saved into Photoshop. Do NOT use the original image that is still open in Photoshop. Select File -> Save As and save the file as a PCX file. That PCX file can now be imported into Deus Ex and used as a masked texture.

If you'd like to check the color palette to see if your transparent color is in the right place, select Image -> Mode -> Color Table while your GIF or PCX file is selected. Your transparent color should be the LAST color displayed. (Photoshop displays the first color last for some reason)

NOTE: If your image has less than 256 colors, your transparent color may not show up in the last square. In that case, things get a little more complicated. You'll need to double-click on the last square and change it to some unique color (purple again is fine). THEN, you'll have to change the other color to something else and use the Fill tool to fill in your transparent areas with the color in the last square. It's difficult to describe, but I hope you know what I mean. If anyone runs into this (I have not), e-mail me and I can improve this section with a better explanation.

If you need to know how to import the texture, see How to add custom textures.

NOTE: If you use method #1 described in the above link, you can check "Masked" when importing the texture or if you use method #2, you can add "FLAGS=2" to the end of the import line. Either of those will default any brush surfaces to "Masked" when the texture is applied. It's not necessary, but it saves a step.


How to add custom sound effects

Prerequisites:
How to add custom packages

Overview:
You can import custom .WAV files into your own package using an import statement that is similar to the mesh, texture, and text import statements. You do need to know how to set up your own packages for this to work, so please follow the above link if you don't know how to do that.

NOTE: For the best trade-off between memory and quality, use 16-bit, 22k, mono .WAV files. If you need software for sound file editing and conversion, CoolEdit is a good choice and a "lite" version of it is available for $40. You can get that here: http://www.syntrillium.com/

1. Create a Sounds folder

I would recommend creating a folder called "Sounds" under your package folder for organizing your sound effects. Put the .WAV files that you're planning on using in this folder.

2. Create or modify a .uc file

You'll need to either create an import .uc file just for importing your sounds, or add your import lines to an existing .uc file. If you have a lot of sound effects, it might make more sense to have a dedicated file for that.

Add an audio import line for each sound effect you want to import, like this:

#exec AUDIO IMPORT FILE="Sounds\Blaster.wav" NAME="BlasterFire" GROUP="Weapons"

The NAME is what will show up in the SoundFX browser and the GROUP will let you categorize your sounds just like you can with textures.

3. Build package

Exit out of UnrealEd if you're in it, delete your .u package file and rebuild it by going to an MS-DOS command prompt and typing "ucc make". Now when you run UnrealEd, your package file should show up as a choice in the SoundFX browser and you can now assign your custom sounds to things in your map.

NOTE: This method will build your sound effects into your .u package file. You can also create a .uax sound package file, if you don't want or need to use an "all purpose" .u package file. There doesn't seem to be an interface for creating those in the SoundFX browser, so you could copy/rename an existing .uax package and delete the redundant sounds from it manually. There *is* a SoundFX browser interface for importing .WAV files and saving the .uax file once it's set up.


How to add custom music

How to create custom music

Prerequisites:
The Basics
Setting up in-game music

Overview:
This will give you a little more detail on adding custom music than what the SDK documentation explains. See MusicDocumentation.doc for the basic info, but I found that document to be a bit confusing and lacking in detail.

1. Create your music

As you might guess, this is the hard part. :) In order to create music for Deus Ex, you have to use a special piece of software called a "tracker". If you're familiar with Cubase, Cakewalk, etc and/or MIDI files, you understand the concept of a sequencer. A sequencer just stores basic information about a song, such as the pitch, start times, and duration of all the notes in the song (for each instrument). This makes a very compact file. Trackers use a similiar approach, but they also store all of the instrument samples with the file. That means that the song will sound the same on any hardware, but the file size is a lot bigger. It's still generally a lot smaller than recorded audio, such as MP3, WAV, etc.

An advantage to this approach is that you can have differerent sections of a tune that you can branch to dynamically within the game. So you can have ambient music that plays while you're just walking around, and more intense music that plays during combat.

If you don't already use a tracker, you'll have to pick one first. There are a number of shareware and freeware ones available. The link mentioned in the SDK docs is a good place to start: www.maz-sound.com. You can also purchase collections of samples there. If you want to just dive in without reading all of that, a good freeware tracker is called ModPlug - you can find it here: pweb.jps.net/~olivierl/.

Trackers such as ModPlug let you import and export to MIDI format, so you may find it easier to use your favorite sequencer to create and edit sections of music.

The trickiest part (aside from actually writing compelling music, of course!) is setting up the pieces of your tune for dynamic play. Basically, the first six "patterns" in your song define how your dynamic content will work. Within each of these six patterns you can place a "B" command (branch) to continue playing other patterns in your song. In ModPlug, that would look something like this:

Notice the B06 at tick 63? That is a "Position Jump" that you can add with the Bxx effect. It will cause the music to jump to the seventh pattern in the song. Why the seventh if it's "06"? That's because the first pattern is "00".

If all of this sounds terribly confusing (which it is at first), you might try checking out the Trackers Handbook. As of this writing, you can get it here: http://www.maz-sound.com/archives/book05.zip.

It can also help to export the songs from Deus Ex, open them up in your tracker, and look at them.

So what are the six types of dynamic music? Here they are:

Pattern 0 - Ambient 1
Pattern 1 - Dying
Pattern 2 - Ambient 2 (optional)
Pattern 3 - Combat
Pattern 4 - Conversation
Pattern 5 - Outro

After you branch from one of these patterns into somewhere in your song, you can set up loops using the "Bxx" command. You can even get fancy and have intros that are not part of the loop and so on.

You don't have to write specific music for all six of these. For instance, if you don't want to write any Ambient 2 music, you can put a Bxx branch at tick 0 to just jump back to the first Ambient 1 pattern or whatever.

2. Import it into Deus Ex

The tracker software you use will save your song in one of several tracker formats, such as .IT / .MOD / .XM and so on. UnrealEd is able to import just about any tracker format, so when you're done with your song, you shouldn't have any problems importing it.

In UnrealEd, select Music from the Browse menu on the upper-right. Hit Import and select your song. Now hit Save to save it in Unreal format as a .UMX file. Your music can now be used in a map.

3. Set up a map to use the music

You should have already read Setting Up In-game Music, but if you didn't, here's how you set up a map to use your music. In UnreadEd, just go to the Options menu and select Level Properties (or hit F6). Expand the Audio properties and click in the Song value area. The easiest way to select a song is to click on one in the Music browser, then hit the Use button in the Song value. You could also define a starting point (a pattern number) into the song by setting the SongSection value, but you shouldn't need to do that.

In most cases, you're done at this point.

4. Add MusicEvents and triggers to a map (optional)

This is not very typical, but if you have an extra special event or if you want some location-specific music within a map that is different that what's in the Level Properties, you can use a MusicEvent actor (available under Triggers). Set the Song property the same way you did in the Level Properties. The SongSection value may be a little more helpful here, depending on what you're doing. There is also a Transition property that you can change. The values are pretty self-explanatory, so I'll let you experiment with those.

You can also set the bSilence if you want to stop the music, which is another way to alter the mood.

The MusicEvent actor alone is not enough to trigger the music. You'll have to also add a Trigger to actually, well, "trigger" the music. Give the MusicEvent object a Tag value and set the trigger's Event to the same thing and you'l be good to go. If you did it right, you should see a red line connecting the MusicEvent and the Trigger.

That's it!

Additional tips

Courtesy of Steve Foxon, who has done some breathtaking music for Deus Ex using ModPlug, here are some additional tips:

Not all features in a lot of the tracker programs are useable in UnrealEd. A lot of the more recent trackers have unique features to that piece of software, that are designed only to be used when recording everything down to a .wav file, such as the VST effects and instruments in ModPlug. Also, in ModPlug, and possibly other trackers, the EQ and reverb stuff doesn't get recognised, but the initial pan, initial volume and surround stuff in the general tab do work. Although I've recently found that it can be a problem using these if there is more than one section to your track (e.g. combat) and another section then uses different panning and volume settings (see Important Note below). I know for sure that the New Note Action doesn't work and neither does the Volume envelope. However, the panning envelope and ping pong looping does work.

Basically I would avoid using instruments in MODPlug, and stick to samples, otherwise you will get problems. I find it useful to put 2 or 3 single note samples of one particular instrument such as a high and a low note, so that the samples doesn't start to sound odd when playing different octaves. Also, get hold of a good wav editor if you can, and maximise the level of the samples as much as possible, as the tracks can tend to sound quiet in game.

Don't use more than 32 channels if you want FX sounds in the game playing at the same time.

Although a track can sound fine when played in your tracker software, when you play it in the SDK (UnrealEd) or in DX, you can get a lot of "glitches" in the music (i.e. "clicking and popping"). This is caused by the sudden cutting off of samples when another of the same sound starts, such as if you are hitting the same note constantly, and the length of your note is shorter than the length of your sample. I found the best way around this is to have a very small quiet bit at the start of the offending samples, short enough that it doesn't put the timing out, and where possible do a quick fade (in the pattern, not the sample) at the end of a released note, such as strings, rather than just stopping it with a "note off" or "note cut" command. The basic idea is to get the samples starting and stopping on a zero value. Sometimes, the only solution is to record a particular sequence of notes as a single sample, but this can make the tracks rather large if not careful.

Most of the standard tracker commands will work (Sxx, Oxx, Pxx, Txx, Axx etc..). Just experiment to see what they all do, or open up a piece of Deus Ex Music and see what commands are used, and what affect they have. You can get some really cool effects if you play, and the most useful command I've just discovered is Oxx, which is sample offset. Basically it will start the sample playing at another place other than the start if required, which can cut down on the number of samples you use as you get different sounds depending on which part of the note you trigger from. You can get a really nice stereo effect using it, by having the same note and instrument twice, panned to the left and right extremes, and then offset one of the samples slightly.

As for keeping sample and file size down, I've found that all samples sound fine at 22k as opposed to 44k, which will halve sample sizes. A tip for using long synth sounds such as pads and sweeps, is to utilise the loop feature for the sample, so basically when you play the note it will keep going until you tell it to stop.

Due to possible differences between your tracker and DX, it's a good idea to regularly check your track in the SDK so that you can eliminate glitches as as you go along, rather than having to sort a bunch out at the end.

If you use the full 256 lines in a pattern, UnrealEd will freeze on you! 255 is fine; it just doesn't like that extra one line!

IMPORTANT NOTE: When used in game, the main ambient section set in your map will revert to playing from the pattern it finished on before it switches to another section such as Combat or Conversation. If the tempo, panning, volumes, etc. are different for these sections from the ambient part, they will not automatically be reset back to previous values when switching back. Therefore, if these values do vary, it is very important that you have tempo, speed and global volume (if used) requirements at the start of every pattern. This also goes for panning, sound control, etc. but these don't necessarily need to be at the beginning of a pattern, as long as they appear before the sample it refers to is played.


How to re-skin generic character meshes

How to re-skin character meshes

Prerequisites:
How to add custom packages

Overview:
Creating new non-player characters (including robots) doesn't necessarily mean creating custom models. Deus Ex has a number of generic character meshes that you can make new textures for and create a whole new look. Also, if you do decide you need to create custom character meshes, you can recycle them by creating them as generic meshes and appying different "skins" to them in the same way. Note that you could make a generic mesh for any type of actor (not just characters), but that is not the typical use.

NOTE: For a full-blown tutorial on how to re-skin character meshes, click here to go to the Custom NPC's tutorial at Universal Constructor.

1. Find a generic character mesh to use or create your own

Creating your own character mesh is only for the truly hard core modders, since there is a large amount of animation you would have to create. Fortunately, you can use a number of generic character meshes that are set up to allow for a fairly wide range of uses. Textures for glasses and pony tails can be created for displaying those elements, or special textures can be applied to prevent those elements from being displayed.

There are 17 "living" generic character meshes in Deus Ex, and each has three different death meshes, for a total of 68 generic meshes. The 17 basic generic meshes and what they seem to be:

MESH NAME | DESCRIPTION | EXAMPLE NPC
GFM_Dress | Generic female wearing dress | NicoletteDuClare
GFM_SuitSkirt | Generic female wearing suit and skirt | MaggieChow
GFM_SuitSkirt_F | Generic female wearing suit and skirt (fat) | Maid
GFM_Trench | Generic female wearing trench coat | ScientistFemale
GFM_TShirtPants | Generic female weaing T-shirt and pants | AnnaNavarre
GM_DressShirt | Generic male wearing dress shirt | Bartender
GM_DressShirt_B | Generic male wearing dress shirt (bald) | GuntherHermann
GM_DressShirt_F | Generic male wearing dress shirt (fat) | Morgan Everett
GM_DressShirt_S | Generic male wearing dress shirt (skinny) | AlexJacobson
GM_Jumpsuit | Generic male wearing jump suit | UNATCOTroop
GM_ScaryTroop | "Commando" mesh, only used once in the game | MJ12Commando
GM_Scubasuit | Generic male wearing scuba gear, only used once | ScubaDiver
GM_Suit | Generic male wearing suit | BobPage
GM_Trench | Generic male trench coat | JCDentonMale
GM_Trench_F | Generic male trench coat (fat) | JaimeReyes
GMK_DressShirt | Generic male kid, only used once | ChildMale
GMK_DressShirt_F | Generic male kid (fat), only used once | ChildMale2

The nice thing is that you can use the exact same textures and apply them to the corresponding "carcass" mesh in the same order.

2. Create the required textures

If you look in one of the original .uc files that create an NPC using one of the above meshes, you'll see a list of textures referenced in properties that start with "Multiskins". Each one of these values corresponds to a surface on the mesh that can be assigned a different texture. A mesh can have up to 8 surfaces. Generally these are divided into meaningful areas such as articles of clothing, body parts, glasses, etc. Choose an NPC that uses the mesh you want to use and export all of the referenced textures in UnrealEd. You'll end up with some .pcx files that you can use to guide you in creating new textures.

How you want to go about creating your new textures is up to you. If you have access to Photoshop, Paint Shop Pro, or equivalent, you may want to use the exported textures as a background layer. Remember to save all textures in the original sizes and as 8-bit .pcx files. It actually may be possible to create higher resolution textures, as long as the "aspect ratio" of the texture is the same. In other words, if the original texture was 256 x 256, you could possibly get away with creating a new 512 x 512 texture.

You don't have to replace all of the textures. If you like the existing glasses textures, and you want your character to wear glasses, there's nothing stopping you from using textures in the Deus Ex packages.

3. Create your new NPC

Once you have your new textures created, you can create your .uc files for creating the "live" and "dead" versions of your new character.

Here are example .uc files for creating the WaltonSimons character.

The relevant parts of the WaltonSimons.uc file:

class
  WaltonSimons extends HumanMilitary;
.
.
CarcassType=Class'DeusEx.WaltonSimonsCarcass'
.
.
Mesh=LodMesh'DeusExCharacters.GM_Trench'
MultiSkins(0)=Texture'DeusExCharacters.Skins.WaltonSimonsTex0'
MultiSkins(1)=Texture'DeusExCharacters.Skins.WaltonSimonsTex2'
MultiSkins(2)=Texture'DeusExCharacters.Skins.PantsTex5'
MultiSkins(3)=Texture'DeusExCharacters.Skins.WaltonSimonsTex0'
MultiSkins(4)=Texture'DeusExCharacters.Skins.WaltonSimonsTex1'
MultiSkins(5)=Texture'DeusExCharacters.Skins.WaltonSimonsTex2'
MultiSkins(6)=Texture'DeusExItems.Skins.GrayMaskTex'
MultiSkins(7)=Texture'DeusExItems.Skins.BlackMaskTex'
.
.
}

You'll want to define your own class to use as the CarcassType so that your custom textures will also show up on the dead version of your character.

The entire contents of the WaltonSimonsCarcass.uc file (the "dead" version of WaltonSimons):

class WaltonSimonsCarcass extends DeusExCarcass;

defaultproperties
{
    Mesh2=LodMesh'DeusExCharacters.GM_Trench_CarcassB'
    Mesh3=LodMesh'DeusExCharacters.GM_Trench_CarcassC'
    Mesh=LodMesh'DeusExCharacters.GM_Trench_Carcass'
    MultiSkins(0)=Texture'DeusExCharacters.Skins.WaltonSimonsTex0'
    MultiSkins(1)=Texture'DeusExCharacters.Skins.WaltonSimonsTex2'
    MultiSkins(2)=Texture'DeusExCharacters.Skins.PantsTex5'
    MultiSkins(3)=Texture'DeusExCharacters.Skins.WaltonSimonsTex0'
    MultiSkins(4)=Texture'DeusExCharacters.Skins.WaltonSimonsTex1'
    MultiSkins(5)=Texture'DeusExCharacters.Skins.WaltonSimonsTex2'
    MultiSkins(6)=Texture'DeusExItems.Skins.GrayMaskTex'
    MultiSkins(7)=Texture'DeusExItems.Skins.BlackMaskTex'
}

Generally, you'll use the same textures in the same order. I suppose you could do something like a bloody version of your new textures for the dead character if you wanted to.

Compile your package and you should see your new character under the appropriate ScriptedPawn category in UnrealEd.


How to add custom meshes

Prerequisites:
How to add custom packages

Overview:
This page will show you how to add your own custom models (meshes) to Deus Ex. It won't cover modeling, texturing, or animating, but it will tell you what to do once those steps are done.

Terminology:

Mesh - In this context, a mesh is just another word for a 3D model.

Texture - A 2D image. This can refer to textures external to UnrealEd, such as .pcx files, or to textures imported into one of your packages.

Vertex - A single point in 3D space. These are basically floating "dots" that are used to help describe the shape of your model. When you model, you "connect the dots" in various ways in order to define how the solid parts will look. (the plural is "vertices")

Polygon - In the Unreal engine, this describes three vertices (points) that are "connected" in a particular order. In the world of 3D animation, this is called a "three point polygon". In other words, a triangle! These triangles form the solid part of your model (the part that you actually see).

Surface - A group of polygons in your mesh that can be referenced as one and can have a set of UV texture mapping coordinates associated with them. In MilkShape, each Group that you create will end up being a surface.

UV Coordinates (a.k.a. Texture Mapping Coordinates) - A set of 2D coordinates that refer to a row and column position on a texture image. In the Unreal engine, every polygon is a triangle made up of three 3D points. Every polygon in a surface can also be associated with three 2D points that refer to a triangle-shaped region of a texture. These 2D points are called UV coordinates. The "U" refers to the column position and the "V" refers to the row position. It's called UV instead of XY so that it's not confused with X, Y, and Z when talking about 3D coordinates.

1. Create your custom mesh

Modeling, texturing, and animating are each huge topics, so I can't cover them in detail here. You may want to hunt down some tutorials or books. I can give you some general tips and point you to some resources though:

MilkShape Home Page (for MilkShape users)
Flay.com (Lightwave)
DaliLlama's Lightwave [6] Page (this guy worked as a modeler/animator on Deus Ex)
3D Cafe (multiple, including 3DS, Maya, Lightwave, etc)
3D Palette (multiple; specific to gaming)

General tips:
* The Unreal engine is limited to 8 surfaces per mesh. So, for instance, don't use more than 8 Groups in MilkShape or more than 8 Surfaces in Lightwave.
* It's a good idea to center your model in most cases. If you're creating a character, it may be easier to set it up so that it is standing on the ground plane. (at Y=0 in most modeling tools)
* The height and width of your textures need to be "powers of 2." In other words, both the height and the width need to be one of these numbers: 1, 2, 4, 8, 16, 32, 64, 128, or 256. You can go higher (512, 1024, etc), but that doesn't seem to be typical when using the Unreal engine (yet). The height and width do not need to be the same, so a 64 x 32 image is fine.

Once you have successfully created your mesh, including texturing and animation, you're ready to go on. If you want to create a generic mesh that can be used multiple times with different textures (skins), you'll still need to assign texture coordinates (UV coordinates) to your mesh using reference textures.

2. Export or convert your mesh to Unreal format

Your next step will be do create an initial pair of mesh files in Unreal format. The exact procedure or utility you use will be different depending on what modeling tool you're using. Here's a list of the common ones with links to where to find them:

Modeler | Export method | Link
MilkShape 3D | Built-in export feature | chUmbaLum sOft
3D Studio (or 3DS Max) | 3ds2de converter (definitely the preferred method for 3D Studio users!) | 3ds2de
3D Studio (or 3DS Max) | 3ds2unr converter | Unreal Model Importing
3D Studio Max 2.x | eerok's Unreal Model Utility (plug-in) | polycount
3D Studio Max 3.x | UT exporter (plug-in) | polycount
3D Studio Max (any) | U3D converter | Macabre's Foundry
Lightwave 5.6 + UView | LWO23D converter | (comes with the Deus Ex SDK)
Lightwave 6.5 MilkShape 3D | Tack's Deus Ex Mesh Tool (not available yet) | Tack's Deus Ex Mesh Tool

In some cases, you may have to convert your mesh into another 3D format before you can export to Unreal format. For instance, you may end up having to export from Lightwave into 3DS format first. (note that only Lightwave 6.5 supports 3DS exporting with UV texturing)

Whichever tool you end up using, you'll end up with a pair of files ending with .3d. One will end with _a.3d and the other with _d.3d. Some of the tools will also create one or more .uc files. We'll get into those later, but you'll probably end up needing to edit at least one .uc file.

You'll also want to convert all of your textures to .pcx format if necessary. If you used 256-color .pcx files as textures in your modeling tool, you don't need to do anything else with them. Note that only 256-color (8-bit) textures are supported by the Unreal engine. This isn't as bad as it may sound, since each image can have its own palette.

If you're using Lightwave 5.x and UView, you'll have to refer to the SDK documentation on how to use LWO23D. I don't have UView, so you're on your own here! If you get it to work, you can skip to Step 4.

Also, if you're using 3ds2de, you can skip to Step 4.

3. Convert your mesh into Deus Ex format

Unless the tool you used in Step 2 directly supports the Deus Ex format (so far, the only one I know of is the LWO23D tool that comes with the SDK), you will then need to convert your .3d files into the Deus Ex format. Note that the Unreal engine will allow you to import the .3d files without doing this step, but your mesh is going to look like a jumbled mess!

Currently, the only tool I know of to do this step is my "unr2de" converter. If you don't have it, download it and read the instructions here:

Unreal to Deus Ex Mesh Converter

If you use MilkShape, you'll also want to check out the MilkShape export tips at the above link.

4. Create or modify a .uc file for importing the mesh into Deus Ex

If the tool you used in Step 3 created a .uc file, you'll need to pull it up in a text editor. If it did not create a .uc file, you can use the following example as a starting point. Move or save this .uc file in your Classes folder that is under your package's folder.

class LaserGun expands Actor;

#exec MESH IMPORT MESH=LaserGun ANIVFILE=MODELS\LaserGun_a.3d DATAFILE=MODELS\LaserGun_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=LaserGun X=0 Y=0 Z=0

#exec MESH SEQUENCE MESH=LaserGun SEQ=All STARTFRAME=0 NUMFRAMES=25
#exec MESH SEQUENCE MESH=LaserGun SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=LaserGun SEQ=Fire STARTFRAME=1 NUMFRAMES=20
#exec MESH SEQUENCE MESH=LaserGun SEQ=Reload STARTFRAME=21 NUMFRAMES=5

#exec MESHMAP NEW MESHMAP=LaserGun MESH=LaserGun
#exec MESHMAP SCALE MESHMAP=LaserGun X=1 Y=1 Z=1

#exec TEXTURE IMPORT NAME=LaserGunTex1 FILE=MODELS\raygun_barrel.pcx GROUP=Skins
#exec TEXTURE IMPORT NAME=LaserGunTex2 FILE=MODELS\raygun_body.pcx GROUP=Skins

#exec MESHMAP SETTEXTURE MESHMAP=LaserGun NUM=1 TEXTURE=LaserGunTex1
#exec MESHMAP SETTEXTURE MESHMAP=LaserGun NUM=2 TEXTURE=LaserGunTex2
#exec MESHMAP SETTEXTURE MESHMAP=LaserGun NUM=3 TEXTURE=LaserGunTex1

defaultproperties
{
DrawType=DT_Mesh
Mesh=LaserGun
}

To understand everything that's going on here, let's break down all of the types of statements you'll need to have in your file.

Class Definition Statement

class LaserGun expands Actor;

Well, right off the bat we've got a problem. The tool you used to create your .3d files didn't know anything about how you plan on using your mesh, so it just set it up as a generic "Actor". This is rarely (if ever) what you'll want when you get to the point of really using your mesh for something (like for a weapon or character). Even if it's just a "decoration", you'll want to change this. We'll get back to this later, but for now this is enough to get the mesh into Deus Ex. It will show up in the UnrealEd Mesh Viewer and as something you can place in a map. You just won't be able to do much with it.

For now, replace "LaserGun" with what you want to call your new object. Do not include any spaces.

Mesh Import Statement

#exec MESH IMPORT
  MESH=LaserGun
  ANIVFILE=MODELS\LaserGun_a.3d
  DATAFILE=MODELS\LaserGun_d.3d
  X=0 Y=0 Z=0

This one's easy. Just replace the _a.3d and _d.3d names with the names of your .3d files and call your mesh something after the "MESH=". This tells the Unreal compiler where to find your .3d files. In this example, the .3d files would be stored in a Models folder under your package folder. This is the common convention, so it's best just to stick with it.

Origin Statement

#exec MESH ORIGIN MESH=LaserGun X=0 Y=0 Z=0

For most items like weapons or pickup items, you'll want to just leave this statement as is, except for changing the mesh name. The MESH ORIGIN statement sets up where the center of the mesh is. In other words, the point where your mesh will rotate around and move from. If you've centered your mesh properly in your modeling tool, you can use X=0 Y=0 Z=0 and the square selection brackets that appear in the game when you're pointing at an item will line up correctly, among other things.

If you're doing a character, you may find it more convenient to model with the feet on the "ground". In that case, you'd want to compensate for that by changing the Z value to halfway up your mesh. In that case, your MESH ORIGIN statement would have something like Z=37 instead of Z=0.

You can also use the MESH ORIGIN statement to set the initial rotation values of your mesh. If you've modeled a character, and he/she ends up standing the wrong direction in the game, you can fix that here. You do that by adding PITCH, ROLL, and/or YAW values to the statement. The values aren't angles though. A value of 64 means 90 degrees, a value of 128 means 180 degrees, etc. So this statement:

#exec MESH ORIGIN MESH=LaserGun X=0 Y=0 Z=0 PITCH=32 ROLL=128 YAW=-64

...would mean a pitch of 45 degrees, a roll of 180 degrees, and a yaw of -90 degrees.

Animation Sequence Statements

#exec MESH SEQUENCE MESH=LaserGun SEQ=All STARTFRAME=0 NUMFRAMES=25
#exec MESH SEQUENCE MESH=LaserGun SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=LaserGun SEQ=Fire STARTFRAME=1 NUMFRAMES=20 RATE=20
#exec MESH SEQUENCE MESH=LaserGun SEQ=Reload STARTFRAME=21 NUMFRAMES=5 RATE=7.5

If your mesh includes animation, you'll usually need to name your various animation sequences in these statements. Most tools that generate .uc files when you create your .3d files don't do much for you here. By convention, the first sequence name is called "All" and simply includes all of your animation frames. Create a MESH SEQUENCE statement for each of your animation sequences and give each a meaningful name. Unless the sequence is only 1 frame long, you'll want to add a "RATE=" statement to the end of the line. This sets up how long it will take to play the sequence, in frames per second.

If your mesh does not include any animation, you can just use something like this:

#exec MESH SEQUENCE MESH=LaserGun SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=LaserGun SEQ=Still STARTFRAME=0 NUMFRAMES=1

Meshmap to Mesh Associations

#exec MESHMAP NEW MESHMAP=LaserGun MESH=LaserGun

Don't worry about this one; just replace LaserGun with the name of your mesh and you'll be fine.

Meshmap Scaling Statement

#exec MESHMAP SCALE MESHMAP=LaserGun X=1 Y=1 Z=1

Scaling is an important concept to understand. The way that your modeling tool's "units" relate to Unreal units differs depending on which tool you use; in some cases the conversion tool you use is a factor too. In MilkShape it's easy: 1 MilkShape unit will become 1 Unreal unit. That way if you treat 16 units in MilkShape as 1 foot, you should be able to set your scaling to "X=1 Y=1 Z=1". Note that when you use "unr2de", the X, Y, and Z scaling should all be equal (unless you want to stretch your mesh out). This is different that what most tools will put in your .uc file because of how the traditional Unreal format works (Z will be half of what X and Y are). Just remember that you'll need to change the numbers to all be the same.

If you go poking around in the mesh import files that the actual game used, you may run into this sort of thing:

#exec MESHMAP SCALE MESHMAP=GM_Suit X=0.00390625 Y=0.00390625 Z=0.00390625

If you were wondering, the number 0.00390625 isn't just some wacky number that somebody made up. It's 1/256. If you are using 3ds2de or a conversion tool that directly supports the Deus Ex format, these would be appropriate scaling values.

Mesh Notify Statements (optional)

#exec MESH NOTIFY MESH=GM_Suit SEQ=Walk TIME=0.1 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=GM_Suit SEQ=Walk TIME=0.6 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=GM_Suit SEQ=Run TIME=0.1 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=GM_Suit SEQ=Run TIME=0.6 FUNCTION=PlayFootStep

You may want to synchronize something with particular parts of your animation sequence. For instance, if you've created a new character mesh, you might want to take a walk cycle that you've created and sync each footstep with a sound of the footstep. In this example, the Walk and Run sequences are both 10 frames long and in both, one foot hits the ground at 0.1 (10%) into the animation sequence, and the other foot hits the ground at 0.6 (60%) into the sequence. This value is independent of the animation rate of each sequence; the Walk sequence's animation rate is 10 frames per second and Run is 18 fps.

Texture Import Statements (optional)

#exec TEXTURE IMPORT NAME=LaserGunTex1 FILE=MODELS\raygun_barrel.pcx GROUP=Skins

While I've labeled this part as "optional", you'll almost always have it. For every new texture image that your mesh uses, you'll need a line to import it. Give it a meaningful name in place of "LaserGunTex1" and fill in the name of the .pcx file. In this example, the .pcx files would be in the \Models folder under your package folder. You can change that to something else if you want.

When would you not need to include this? There are three cases that I can think of:
1) You're using a texture that is in a different package. I would recommend avoiding that if possible, just because it could get confusing. However, if there's a cool texture in one of the Deus Ex packages that you want to use, go for it.
2) The import statement is in a different .uc file used by the same package. I would tend to avoid this one too.
3) You want to set the mesh up for multi-skinning. It's possible to leave out any associations to specific textures and create a generic mesh. That's how all of the NPC's in Deus Ex are done. There are only a handful of character meshes in Deus Ex, but each mesh can have different sets of "skins" (textures) that can be applied so that the same mesh looks like a different person. For example, the AlexJacobson and BoatPerson characters both use the same mesh, but have different textures. How to actually create a new NPC (or whatever) and assign skins is another topic; see the link below.

If you assign the same surface to multiple Groups (surfaces) in MilkShape, the .uc file it generates will have multiple TEXTURE IMPORT statements for the same .pcx file. That's not what you want. Remove any duplicate import statements. You may need to rename some of the textures in the "TEXTURE=" part of the MESHMAP SETTEXTURE statements to use the name of the texture that you actually *are* importing.

Meshmap to Texture Associations (optional)

#exec MESHMAP SETTEXTURE MESHMAP=LaserGun NUM=1 TEXTURE=LaserGunTex1
#exec MESHMAP SETTEXTURE MESHMAP=LaserGun NUM=2 TEXTURE=LaserGunTex2
#exec MESHMAP SETTEXTURE MESHMAP=LaserGun NUM=3 TEXTURE=LaserGunTex1

Again, you'll almost always want to include these types of statements, unless you're creating a generic mesh. These statements associate the various surfaces in your mesh with specific textures. In MilkShape, you will get one of these for each Group you create. Each Group will be a "surface" that is numbered 1 to whatever. The "NUM=1" line says to associate the first surface with the LaserGunTex1 texture. Note that you can refer to the same texture from multiple surfaces. In this case, you'd only need to import LaserGunTex1 once, though. Since the maximum number of surfaces allowed is 8, you would never have more than 8 of these statments per mesh.

Level-of-Detail setting (optional)

You may not realize this, but when you import a model, there is an automatic level-of-detail (LOD) feature which happens. Here's an example of that import statement for the GM_Trench character model, which actually *reduces* how aggressively to reduce polygons as the distance from the model increases:

#exec MESH LODPARAMS MESH=GM_Trench STRENGTH=0.5

Perhaps the Deus Ex developers found that character models distorted too much. If you don't specify this line, the default ends up being STRENGTH=1.0. For a lot more detail on LOD, see Epic Games' LOD tech notes.

Default Properties

defaultproperties
{
DrawType=DT_Mesh
Mesh=LaserGun
}

Don't worry about this too much. Just replace "LaserGun" with the name of your mesh and you're good to go.

Remember to save your .uc file in the \Classes folder under your package folder and name it the same as the class. The example would have been named LaserGun.uc.

5. Optional: Create another .uc file for importing a new "thing"

The topic of how to add stuff into Deus Ex that actually do things is covered elsewhere, but I'll briefly show you the basic idea.

Your mesh is just a 3D object with no interesting properties or behavior. You'll typically want to use your mesh as a weapon, character, pickup item, or at least something you can interact with in some way. The way to do that is by creating another .uc file that "expands" on an existing type of object, such as DeusExWeapon (for weapons), HumanCivilian (for civilian characters), DeusExPickup (for things that can be picked up and put into your inventory), or DeusExDecoration (for stuff like plants). Each type of object that you can create (there are many), has a set of properties that you can set. One of the properties is which mesh or meshes to use. Some objects may have multiple meshes associated with them. For instance, a weapon has a "first person" version of the mesh that includes JC's hand and part of his arm, as well as a "pickup" version that is used to show that weapon sitting on the ground.

Without going into a lot of detail, here's a short example to give you the idea. The part in quotes after LodMesh would be the reference to your mesh (that was imported in another .uc file).

class Guitar extends
  DeusExDecoration;

defaultproperties
{
bCanBeBase=True
ItemName="Fender Stratocaster"
Mesh=LodMesh'MyPackage.Guitar'
CollisionRadius=18.790000
CollisionHeight=6.750000
Mass=10.000000
Buoyancy=15.000000
}

6. Import it into the game!

When you have your .uc files, your .3d model files, and your .pcx texture files in place, you're ready to actually import your mesh into your package, so that it's ready to use in Deus Ex. If you've ever compiled a package with "ucc make" then you already know how to do this step. Delete your .u package file from the \DeusEx\System folder and in a command prompt (MS-DOS prompt) in the \DeusEx\System directory type in "ucc make". If you've done everything right, your mesh is ready to go. Fire up UnrealEd and enjoy.

Related topics:
How to organize multiple meshes/actors in your .uc files
Re-skinning generic meshes


How to organize mesh import files

Prerequisites:
How to add custom meshes

Overview:
This page will show you a way to organize your mesh import files. You may find that you prefer a different approach, but this is a clean method that the Deus Ex developers themselves used.

1. Create one or more "master" import .uc files

Instead of importing each mesh as a subclass of the Actor class, you can import all of your meshes and make them part of a subclass of the Object class. Why would you want to do that? Your goal in importing a mesh is really just to make it available for use in the properties of actor classes like weapons, pickup items, characters, etc. So you can import your meshes without having them show up in the Actors list in UnrealEd. You do that by creating a subclass of the Object (the highest level class) and making it an abstract class. That just means that by itself it doesn't do anything. Well, a mesh doesn't do anything by itself, so that's fine.

If you've exported all of the scripts (by using the Export All button in UnrealEd), you'll have a directory under your \DeusEx directory called \DeusExItems. All of the .uc files in this directory are for importing the meshes and textures for things like weapons and pickups. The AllWeapons.uc file contains the import statment for all of the weapon meshes and textures in the game. It starts with this:

class AllWeapons expands Object
    abstract;

So you can make your own "master" import files for whatever categories you want. If you don't have a huge number of meshes, perhaps you'll only use one.

2. Create individual .uc files for each actor (usable item)

You would then have an individual .uc file for each actor class. Again, these would be things like weapons, pickup items, characters, decorations, and so on.

Here's an example of the sniper rifle class from the actual game. Notice that as part of its properties it references meshes in the DeusExItems package, such as SniperRifle and SniperRiflePickup.

//=============================================================================
// WeaponRifle.
//=============================================================================
class WeaponRifle extends DeusExWeapon;

defaultproperties
{
LowAmmoWaterMark=6
GoverningSkill=Class'DeusEx.SkillWeaponRifle'
NoiseLevel=2.000000
EnviroEffective=ENVEFF_Air
ShotTime=1.500000
reloadTime=2.000000
HitDamage=25
maxRange=48000
AccurateRange=28800
bCanHaveScope=True
bHasScope=True
bCanHaveLaser=True
bCanHaveSilencer=True
bHasMuzzleFlash=False
recoilStrength=0.400000
bUseWhileCrouched=False
bCanHaveModBaseAccuracy=True
bCanHaveModReloadCount=True
bCanHaveModAccurateRange=True
bCanHaveModReloadTime=True
bCanHaveModRecoilStrength=True
AmmoName=Class'DeusEx.Ammo3006'
ReloadCount=6
PickupAmmoCount=6
bInstantHit=True
FireOffset=(X=-20.000000,Y=2.000000,Z=30.000000)
shakemag=50.000000
FireSound=Sound'DeusExSounds.Weapons.RifleFire'
AltFireSound=Sound'DeusExSounds.Weapons.RifleReloadEnd'
CockingSound=Sound'DeusExSounds.Weapons.RifleReload'
SelectSound=Sound'DeusExSounds.Weapons.RifleSelect'
InventoryGroup=5
ItemName="Sniper Rifle"
PlayerViewOffset=(X=20.000000,Y=-2.000000,Z=-30.000000)
PlayerViewMesh=LodMesh'DeusExItems.SniperRifle'
PickupViewMesh=LodMesh'DeusExItems.SniperRiflePickup'
ThirdPersonMesh=LodMesh'DeusExItems.SniperRifle3rd'
LandSound=Sound'DeusExSounds.Generic.DropMediumWeapon'
Icon=Texture'DeusExUI.Icons.BeltIconRifle'
largeIcon=Texture'DeusExUI.Icons.LargeIconRifle'
largeIconWidth=159
largeIconHeight=47
invSlotsX=4
Description="The military sniper rifle is the superior
  tool for the interdiction of long-range targets. When coupled with the proven
  30.06 round, a marksman can achieve tight groupings at better than 1 MOA (minute
  of angle) depending on environmental conditions."
beltDescription="SNIPER"
Mesh=LodMesh'DeusExItems.SniperRiflePickup'
CollisionRadius=26.000000
CollisionHeight=2.000000
Mass=30.000000
}


Creating custom "pickups"

Prerequisites:
The Basics
How to add custom packages

Overview:
I haven't focused much on programming (coding) UnrealScript on this site, but I got a request to cover something that I would consider a good introductory topic. Things that the player can pick up and put into their inventory, use, or drop are called "pickups." You can create your own custom pickups by creating a custom "class."

In this example, I'll step you through creating a custom pickup class: a can of Zap! soda. It's 50% more powerful than Nuke! And don't forget, Diet Zap! takes just like regular Zap. :)

Download:
Example files (5K)

1. Create your class file

First, you will need to have your own custom package set up. If you don't, click here for instructions.

You'll need to make a file to contain the source code of your new class. You can use Notepad or any text editor that can write out plain old text files. Some folks like to use a tool called WOTgreal for UnrealScript editing, but I just use Notepad myself.

Create a text file in your \DeusEx\MyPackage\Classes folder called ZapSodaCan.uc, where "MyPackage" is the name of, well, whatever your custom package is named.

It is *crucial* that you have the file extension .uc at the end. The Unreal compiler will never attempt to compile it otherwise. If you have your Windows environment set up to hide file extensions, you may end up with a file called ZapSodaCan.uc.txt or something and not realize it. I would recommend that you set up Windows to *show* file extensions. For more info on that (or creating classes in general), I recommend the excellent Creating Packages and Classes tutorial over at Universal Constructor.

2. Write the code

You never really write an UnrealScript program from scratch. You always "inherit" from an existing class. What the heck does *that* mean, you ask? Well a "class" in terms of the Unreal engine is typically an Actor, which is kind of like a template for a thing you can drop into a map. You know, it's all that junk listed in the Class browser. (that's why it's called the Class browser!)

To "inherit" from a class means that you want to use aspects of another class that's already been written without writing the code yourself. Most of the time you just want to change some properties or do things just a little differently. For instance, there's a class called DeusExPickup that handles all of the common stuff like what happens when the player picks the item up, uses it, or drops it. If you created a class that was inherited from DeusExPickup, you'd get all of that basic behavior automatically.

In object-oriented terminology, when you plop an Actor into a map, you're telling the game engine that when the level starts, it should create an "instance" of a particular class. But don't worry about that too much!

OK, time to start typing. It's optional, but you might want to have some comments at the top describing what your class is. It's also a good idea to put comments above any section of code that is the least bit significant. Making changes later will be a LOT easier, trust me! Comments are ignored by the compiler.

To put a comment line in your code, put two slashes in front of the line. Type something like this in for a comment:

//=============================================================================
// ZapSodaCan - a can of Zap! cola. Heals 3 points instead of the measly
// 2 points that Nuke! heals.
//=============================================================================

Now we want to set up the name of the class and what class it's inherited from. The class name after the keyword "extends" is the class you are inheriting from, sometimes referred to as the "base" class. So type this:

class ZapSodaCan extends Sodacan;

NOTE: The keyword "expands" can be used instead of "extends" - they both do exactly the same thing.

Don't worry about the content of this next part too much. I copied this part from the Sodacan.uc file, which is the source code for the normal Deus Ex soda can. The only change I made was to have it heal three points of health instead of two. The important thing to get out of this part is that we're "overriding" the Activated state. There's a existing state called Activated in one of our ancestor classes, so we're going to replace it with our own. This is the only actual "code" in this file. Code is where you change *how* things work. If you wanted to heal two points like a normal soda can, you could leave this entire section out. Type this:

state Activated
{
function Activate()
{
// can't
  turn it off
}

function BeginState()
{
local DeusExPlayer player;

Super(Sodacan).BeginState();

player = DeusExPlayer(Owner);
if (player != None)
player.HealPlayer(3, False);

PlaySound(sound'MaleBurp');
UseOnce();
}
Begin:
}

This last part is often the only thing you'll have in a class. It defines the default properties. They are the "default" values that get assigned when you first plop something into a map. But in the map editor you can change many of them, depending on how the variables are initially declared. (you don't have to worry about that in this example) Type this:

defaultproperties
{
ItemName="Zap! Soda"
Description="A can of Zap! soda. The
  label reads: '50% more effective than Nuke!'"
beltDescription="ZAP SODA"
Multiskins(0)=Texture'DeusExItems.SodacanTex2'
}

That's it for the basic coding. The ItemName is what appears when the player is near the item and it pointing at it and also shows up other places. The Description is the text that is displayed when the player clicks on the item on the inventory screen. beltDescription is what's shown under the item on the belt inventory at the bottom of the screen. Don't make it too long or it won't fit.

The final line is what makes it look like a can of "Zap!" instead of "Nuke!" Every mesh (model) in the game has at least one surface and each surface is assigned one texture. The soda can model only has one surface and we can override which texture is assigned to it with the Multiskins property. The Deus Ex artists created three alternate soda can textures which were never used in the original game, one of which is for Zap! soda (called SodacanTex2).

If you have a custom mesh that you'd like to use, or just want to use a different mesh built into the game, you can set the PlayerViewMesh, PickupViewMesh, ThirdPersonMesh, and Mesh properties.

If you haven't already done so, be sure to save the file!

3. Create belt and inventory icons (optional)

To do a pickup properly, you'll want to create icons for it that show up in the game's user interface (UI). How exactly you go about that is beyond the scope of this tutorial. You could draw them by hand in a paint program, render them using a 3D tool like 3D Studio Max or Lightwave, or possibly even get some usable images from in-game screen shots. These icons aren't necessary - they're just cosmetic.

You will need to make the icons "masked textures" in order to mask out the pixels surrounding the object. For more information on creating masked textures see How to create masked textures. Here's what I came up with by rendering the Zap! soda can in Lightwave:

For a more professional look, you would ideally have one of those aliens known as "artists" manually touch them up a lot in Photoshop.

The smaller one on the left is for the "belt" icon that's shown in the inventory strip at the bottom of the screen. It's a 64 x 64 texture, but you don't want to use the whole thing or your icon will overlap parts of the UI. If the object is a weapon, this picture will also show up in the "ammo count" part of the display.

The larger one is shown in the main inventory window and can be trickier in some cases. Our soda can is easy, since it just takes up one inventory slot, but you may want a different type of item to take up more inventory slots and in a certain "shape." The one in this example is a 32 x 64 texture and again, you don't want to use the entire area, or you'll partially overlap the inventory grid, which will look bad. (it's OK to completely take up multiple inventory slots, but that's not what we want here)

You define that shape with two more properties: largeIconWidth and largeIconHeight. We don't need to override those in this case, since we can use the values that are inherited from the Sodacan class. It wouldn't hurt anything to set them in our class as well, but sometimes it's better not to clutter up the code if you don't have to. We could have put these two lines in our default properties section of the ZapSodaCan.uc file:

largeIconWidth=24
largeIconHeight=45

Once you have your textures created, you'll need to import them by using either a separate class file, or by putting the texture import lines in the same file. (you can also reference textures you've imported into .utx files) For more information on importing textures, see How to add custom textures. In the example files that you can download, I used two separate files. If you start having a lot of textures, sometimes it can be easier to keep track of with that method.

Add these lines in the default properties section of the ZapSodaCan.uc file to point to your custom icons:

Icon=Texture'MyPackage.Icons.BeltIconZapSodaCan'
largeIcon=Texture'MyPackage.Icons.LargeIconZapSodaCan'

Again, you would type your package name instead of "MyPackage."

I created a folder under my \DeusEx\MyPackage folder called Textures for storing the textures. These two lines will import the textures from there. I could have put them in ZapSodaCan.uc, but I decided to put them in a separate class called ImportTextures.uc:

#exec TEXTURE IMPORT NAME=BeltIconZapSodaCan FILE=Textures\BeltIconZapSodaCan.pcx GROUP=Icons
#exec TEXTURE IMPORT NAME=LargeIconZapSodaCan FILE=Textures\LargeIconZapSodaCan.pcx GROUP=Icons

4. Compile

This step should be nothing new if you've ever compiled a package. Basically, you want to pull up a command prompt (a.k.a. "DOS prompt") and "cd" to your \DeusEx\System folder. If you're running UnrealEd, exit it now. If you've ever built your package before, you'll need to delete it or the compiler will not attempt to compile it. So "del MyPackage.u" is what we'll do in this example.

Then type "ucc make." I usually like to direct the output to a file by typing "ucc make > out.txt" (it can be helpful when there are a lot of errors).

Notice that no activity has happened in any of the other packages. That's because I didn't delete them.

5. Try it out in a map

If your compile worked, then it's time to put some Zap! soda cans in a map. Fire up UnrealEd and you should see your new class show up in the Class browser. It'll be under Sodacan, like this:

Notice that when you have a class selected, UnrealEd will show you which package it's in. So you should see your package name in front of "ZapSodaCan." At this point, UnrealEd is getting the ZapSodaCan class out of your compiled package - in this case it's the MyPackage.u file in my \DeusEx\System folder.

Go ahead and add one or more to a map, play the map, and grab some ice cold Zap! soda. Refreshing isn't it? To test that it heals three points, I put a LAM in a test map and blew it up near me so that my health was lowered first. (if you're at 100% health, it'll say "Healed 0 points")

The ItemName property shows up in a few places, such as when you've highlighted the item, in the message area when you pick it up, drop it, or use it, and in the inventory screen if the item is selected:

Here's a visual breakdown of the various properties that we've set:

I haven't really touched on how you get a completely custom pickup to do what you want it to do. That's because UnrealScript is so flexible, you can do just about anything. If you're interested in learning UnrealScript, I'd suggest digging into the source code for the existing classes and experimenting a LOT.

TIP: If you've never done so, in UnrealEd, hit the Export All button in the Class browser. That will export all of the source code into folders under your \DeusEx folder by package name. (it could take a few minutes!) The most interesting package is called DeusEx. It contains all of the decorations, pickups, weapons, and NPC's among other things. Once you've exported the code, go to your \DeusEx\DeusEx\Classes folder and start poking around. I wouldn't recommend editing any of those files, since it could be confusing and you typically wouldn't be rebuilding the DeusEx.u package (if you screw it up, Deus Ex will become unplayable) I'd recommend doing all of your coding experiments in your own package.

NOTE: The existing vending machine is hard-coded to create a "Sodacan" (Nuke! soda) object if it's set to "drink" mode. An interesting exercise might be to create your own vending machine class that dispensed Zap sodas instead. Since they heal better, you might want to charge three credits instead of two!

Have fun!


Linking Maps Together

Linking Maps Together (Teleporters)

Prerequisites:
The Basics

Overview:
When your map is getting too big OR it's time to change major locations, you can link multiple maps together. How you chop up your maps is up to you, but you can look at the real Deus Ex maps for lots of examples.

This tutorial is geared toward creating "two-way" links using where the player can go back and forth between maps, like the way the New York City maps were set up. To create transitions between major locations where you'd like to see Jock's helicopter take off and that sort of thing, you would use a MapExit and a PlayerStart instead of multiple Teleporters. Stay tuned for a MapExit tutorial.

IMPORTANT: You MUST name your maps with a .dx extension for teleporters to work properly. When loading any maps saved with a .dx extension, you'll need to either type in the full filename of the map, or type *.dx for the filename, hit enter, and then select your map.

IMPORTANT: In order for the state of the maps to be properly saved during gameplay, you must also name your maps starting with the mission number. You only care about retaining the state of a map when you are using 2-way teleporters (see below). So if the mission number of the maps was 66, your map names might be something like 66_Map1.dx and 66_Map2.dx. The map name in the DeusExLevelInfo's MapName property must also match. So if your maps's file name is 66_Map1.dx, the MapName value in that map's DeusExLevelInfo item would be 66_Map1. If you do not name your maps correctly, items that the player picks up will re-appear when the player goes back to that map.

1. Set up common areas between maps

If you're setting up a link to another map because it's time for the player to go to an entirely new location (such as a new mission), you can skip this step.

If the new map is a continuation of the same area, you might want to have a hallway or something which you can duplicate so that the player feels that he/she is in the same area; see some of the Deus Ex maps for examples. Generally, you'll want to repeat only a very small section of the other map. In this common area, you'll be placing items called Teleporters in both maps.

2. Set up map names

All of your maps will need to have a DeusExLevelInfo item. Add them now if you need to (they look like this: ). They are available under Actor -> Info.

Pull up your DeusExLevelInfo properties and make sure that the MapName value is filled in for all of your maps. Be sure to also set a mission number in the missionNumber value and name your map starting with that number and then a "_".

IMPORTANT: Do NOT use any spaces for the MapName values. If you do, you'll get an error when the maps start.

3. Add a pair of Teleporters to your first map

Pull up one of the maps you want to link to/from, it doesn't really matter which one. If you want to set up a one-way link, pull up the "from" map. Expand Actor -> NavigationPoint and select Teleporter. Go to the area on the map where you want the link to happen and add a Teleporter there; this will be your "send" Teleporter for this section of the map. It will look like this in the editor: .

Right-click on it and pull up its properties. Expand the Teleporter category and fill in the URL value with the name of the map you want to link to, followed by a "#", and then the name of a teleporter that you will put in that map. This will be the "send" teleporter on this map, so we'll leave bEnabled set to True for this one. We'll also leave its Events -> Tag name as None.

NOTE: If you want to set up a one-way link (if your level is progressing to a new mission or major area and you don't want or need the player to be able to backtrack), then you only need one Teleporter on this map, so you can skip the rest of this step.

Now we'll add a SECOND Teleporter to the same map. Why? While it's possible to have a single Teleporter act as both the "send" and the "receive" point in a map, if the player accidentally backs up even slightly after teleporting, the other map will load up. That's just not very nice!

So add a "receive" Teleporter that will be the point where the player appears when coming from the other map. Position this one so that the player is not likely to run into your "from" Teleporter. Point the red arrow coming out of the Teleporter symbol away from your other Teleporter and toward where the player should go. (the red arrow defines which direction the player will be facing when he appears)

This time we don't want this to act like a "send" Teleporter, so pull up its properties and set bEnabled to False. You can fill in the URL value if you want, but it won't do anything.

You also need to set its Events -> Tag value to something identifying this location.

4. Add a pair of Teleporters to your second map

Now pull up your other map and repeat Step 2, but this time do everything in reverse.

Add your "receive" Teleporter. In this example, your "receive" Teleporter would have bEnabled set to False a Tag value of "theline". It doesn't matter what the URL value is.

NOTE: If you're setting up a one-way link, you only need a "receive" Teleporter on your second map, so you're done!

Now add your "send" Teleporter. For this example, the "send" Teleporter on the second map would have a URL value of "70_Disneyland_Pirates#serviceentrance", a bEnabled value of True (the default) and it doesn't matter what the Tag value is.

That's it, try it out.

NOTE: You can also use Teleporters to instantly zap to another part of the same map. Though Star Trek style transporter beams don't fit in with the world of Deus Ex, your levels may have a different theme than Deus Ex or you might think of some other reason to do that. To teleport within the same map, just put in the Tag name of another Teleporter on that map as the URL value, without any map name or "#".

If all of these URL and Tag values have you confused, maybe the following illustrations will help. If you had two maps called Map1 and Map2, here's how you could set up the Teleporters to link them together.

For a one-way link from Map1 to Map2:

For a two-way link between Map1 and Map2:


Creating Cinematics

Prerequisites:
Setting up your own packages
 Intro to ConEdit: Creating basic conversations

Overview:
This tutorial will cover how to create real-time "cut scenes" (cinematics) like the ones in Deus Ex for the intro and end games. The key is to use CameraPoint objects to define the camera movement. If you're going to use a conversation during the cut scene, you will need to use a custom package (since a mission script will be required) as well as be familiar with ConEdit, so please go to the above links if you need to.

Download example map, conversation, and script files (13K)

1. Set up "scenes"

The first step is to create a new map. As you might guess, you'll have to set up all of the brushes, NPC's, decoration, and lighting in the map to act as the "sets" for your little movie. In the Deus Ex intro, they set up several different areas that acted like individual sets. When you define the movement of the camera, you'll be able to "cut" directly to a different location.

2. Create a conversation

You'll likely want to include a conversation that plays during your movie. You can have the characters that are talking be visible to the camera some of the time, but that's not a requirement. A conversation is not required, though. If you don't need a conversation, you can skip this step as well as Step 4.

Choose one of the characters in your map to be the owner. Create a new .con file in ConEdit, and create a single conversation with that character as the owner. You don't need to do anything fancy here, just add normal Speech events.

Be sure to check the "Non-interactive Conversation" property of your conversation.

3. Place CameraPoint items

Now the fun part. Here's where you will define the motion and position of the camera. You can really go nuts with this part, but for now let's keep it simple.

The camera will actually start at the PlayerStart, so add a PlayerStart if you haven't already. Position and rotate it to where you'd like the camera to start. It's OK to start it high in the air or whatever - there won't be any player interaction, so the player can't be killed.

Now you can define the rest of the camera's path. In UnrealEd, under Actor -> Keypoint, select CameraPoint. Add one to your map where you'd like the camera to go next. They look like this: in the editor. To get a rough idea what the camera will end up seeing, use the 3D view in UnrealEd. Then you can line up the eyeball icon of the camera in the editor with the CameraPoint eyeball icon.

Pull up the CameraPoint's properties. For your first camera position, you probably won't need to change anything. Go ahead an add another CameraPoint where you'd like the camera to go next, and pull up *its* properties and expand the CameraPoint category. You'll need to set the sequenceNum to 1. (your first CameraPoint should have a sequenceNum of 0) You'll need to bump up that number for each new CameraPoint you add.

Another important thing to set is the timeSmooth value. For a camera move, that determines how long it will take the camera to move to that point. To instantly "cut" to a new location, set the timeSmooth value to zero.

Most of the time you will leave the Cmd value set to CAMCMD_MOVE (a camera move). But you can also do a number of other things such as pans, tilts, rolls, etc. Most of these other commands work along with the Value property. For examples of some crazy stuff you can do, check out the 99_Endgame4.dx map. That's the "dance party" cut scene. For other examples of using CameraPoint's, check out the 00_Intro.dx map and the other "99_Endgame" maps.

One interesting CameraPoint command is CAMCMD_TRIGGER. You can use that command along with the eventName property. You can set the eventName to the name of something you want to trigger. That way you can synchronize "scripted events" to correspond to where the camera is. In my example map, I fired off an OrdersTrigger and an AllianceTrigger using that.

Add all of your CameraPoint's or just a few to get started. You can always add more later.

4. Set up mission script

In order to have a conversation running during your cut scene, as well as firing off your conversation initially, you'll need to associate a mission script with your map. Don't worry, you won't have to write any code, just change a few things in a script.

Create a file called MyIntroMission.uc (or whatever you want) in your package's Classes folder based on the TutorialMissionIntro.uc that's included with my example map. You'll need to change wherever it says "TutorialMissionIntro" to whatever you are calling your mission script.

You'll also need to change the references to MaggieChow to whatever character is the converstion owner in your map. You can also change the references to "maggie" to something else, but that's not important (as long as it's consistent).

NOTE: If you've never created a mission script before, it may be helpful to do the How to make the opening text to show up tutorial first.

Exit UnrealEd if necessary and build your package using "ucc make".

Fire UnrealEd back up and pull up your map. Be sure to add a DeusExLevelInfo to your map. Pull up its properties, expand DeusExLevelInfo, and set the Script value to your mission script.

Remember to set the ConversationPackage value to the name of your package.

Your map should now work as a cut scene. If you have any problems, please look at my example map.

5. Set it up to load first map after intro played (optional)

If you're creating an intro cut scene, you'll most likely want to have your first playable map loaded as soon as the intro ends.

One way to do that is to trigger a MapExit item with your final CameraPoint using the CAMCMD_TRIGGER camera command. (thanks for the suggestion Damocles!)

If you happen to be using a custom player class, there's an alternative. In the default properties of your custom player class, you can instead set bStartNewGameAfterIntro to True, and strStartMap to the name of your map (without the .dx extension).


Setting up for the Team UC Mod Loader

Prerequisites:
The Basics

Overview:
When you've got your mod (playable levels) complete, you naturally would like to share it with others. While you *could* just zip up all of your map and package files and post them on a web site, that would be rude. Why? Because the player would not have any easy way of starting your levels. He or she would have to either have to have the SDK installed so that it could be pulled up in UnrealEd, or would have to know the correct console commands to type in to fire up the first map.

There are really only two options available to provide "nice" ways for the player to load your mod. I'll briefly discuss the pro's and con's of each. If in doubt, I would choose Option 2, but that's just me.

Option 1: Use the original "JP9000" DX Mod Loader.

Pro's:

  • It was the first, so it *is* more of a standard. Some classic mods, such as Rydberg Field use this one.
  • Allows you to use conversations and other text without overwriting DeusExText.u, etc. With the latest DX and SDK patches, that is no longer an issue though

Con's:

  • Overwrites settings in your .ini files, which some have encountered problems with
  • Requires the player to launch a separate stand-alone application to choose which mod to load
  • Doesn't have many additional features

For more information, please see this detailed tutorial over at Universal Constructor: The DX Mod Loader.

Option 2: Use the Team UC Mod Loader.

Pro's:

  • Mods are launched from within Deus Ex itself. A new menu option, "Mod Loader" is added to the main Deus Ex menu.
  • Provides many features, such as setting the player's initial inventory, skills, skill points, and augs, allowing the "New Game" windows to appear so that the player can set difficulty level and allocate initial skill points, and allows a custom player class to be used without any .ini file editing by the player.

Con's:

  • It's not yet an established standard, so some players may have to download and install it before they can play your mod.
  • The included documentation can be confusing.
  • Currently requires the player to do a one-time manual install involving some file copying and an .ini file change

Since I prefer the Team UC Mod Loader, that is what I'll be covering in this tutorial.

Download:
Team UC Mod Loader

1. Install the Team UC Mod Loader

The Team UC Mod Loader used to include a slick installation procedure, but that caused some problems, so the current version requires a manual install. After downloading the Team UC Mod Loader, copy DeusExML.u, DeusExML.int and DeusExML.ini into your \DeusEx\System folder. Then pull up the DeusEx.ini file in your \DeusEx\System folder and in the [Engine.Engine] section, change the DefaultGame= file so that it looks like this:

DefaultGame=DeusExML.MLGameInfo

By default, the Mod Loader window will come up automatically when you hit ESC. If you'd like the main menu to appear first (like it usually does), pull up the DeusExML.ini file in your \DeusEx\System folder and change the bAutoStart line so that it looks like this:

bAutoStart=false

Go ahead and try it out to make sure the Mod Loader menu options appears and that some lines appear in the mod loader window. It comes with a document called "DeusExML ReadMe.htm", so you may want to look that over. This tutorial doesn't cover any information that's not in that document, but includes more full-blown examples that may be helpful.

2. Create a basic .int file

In Notepad or your favorite text editor, create a new file called "MyMod.int" where MyMod is the name of your mod. Save it in your \DeusEx\System folder.

Type the following text in, but replace "My Mod" with the name of your mod that the player will see in the list, and replace what's after "Map=" with the name of the first map of your mod.

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Map=MyMod_40_FirstMap.dx")

Now fire up Deus Ex and you should see your mod show up in the Mod Loader list. If there are any typos or problems in your .int file, it won't show up in the list. Double-click on your mod and it will start.

NOTE: The map itself needs to be in the \DeusEx\Maps folder for this to work. So be sure to give your maps unique names. The naming convention I have been using is the mod name, followed by the mission number, followed by the overall location (such as the name of a city), followed by the specific map location. For instance, MyMod_42_Paris_EiffelTower.dx.

At this point, you are done if you don't need any other features. You'll likely want to take advantage of at least a few, so read on. If you don't need anything further, skip ahead to the last step for some advice on how to package your files.

3. Set up the player's initial inventory (optional)

The "Description" line is where you define all of the special features you want to use. Always leave the "Class=Class" part alone and only change the MetaClass if you know what you are doing. You can combine as many keywords (such as Inv) as you want to use as many of the features as you need. To set the player's starting inventory, add a "Inv=" inside your Description section. In this example, the player would start out with just a prod charger and two prod charger batteries (clips):

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Inv=DeusEx.WeaponProd;DeusEx.AmmoBattery(2);;Map=MyMod_40_FirstMap.dx")

You can add as many items as you like, as long as they are valid Pickup items. If you are using custom weapons or whatever, you can put in things like MyPackage.LaserGun and so on. Separate each item with a semicolon and end the inventory list with two semicolons. To specify multiple items of the same type (like for Multitools or ammo), put the number of items in parenthesis after the item name.

4. Enable the Difficulty Level and Skill Points "New Game" windows (optional)

This one's very easy. If you'd like the New Game windows that you get when you start a real Deus Ex map, just put an "Action=Start" inside your Description section like this:

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Action=Start;Map=MyMod_40_FirstMap.dx")

If you are using a custom player class with a different mesh or skin than JC Denton, this will be a little weird, since the player will be choosing which JC Denton skin to use. There is, in fact, a way to define your own custom character portraits, but that is beyond the scope of this tutorial.

5. Use a custom player class (optional)

I'm not going to cover creating a custom player class here, but if you want to do things like have the player look like someone other then JC, you'll need to inherit (subclass) from MLPlayer and do the following in your .int file, where BugsBunnyPlayer is the name of your player class and MyPackage is the name of your package:

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Class=MyPackage.BugsBunnyPlayer;Map=MyMod_40_FirstMap.dx")

Be careful not to change the Class=Class part - only add a Class= inside your Description section. Those are two very different settings!

6. Set initial number of credits (optional)

Here's an easy one: add a Credits= to your Description to set the player's starting money, like this:

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Credits=1500;Map=MyMod_40_FirstMap.dx")

7. Set initial skill points (optional)

Another easy one: add a SkillPts= to your Description to set the player's starting skill points, like this:

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="SkillPts=5000;Map=MyMod_40_FirstMap.dx")

8. Set initial skill levels (optional)

This one's a bit tricky, so here goes. To set up starting skill levels, you use a Skills= section and list all of the skills in order using a number to specify which skill level you want. Each number represents a skill level as follows:

0 | UNTRAINED
1 | TRAINED
2 | ADVANCED
3 | MASTER

Here is the order of the skills to use:

Weapons: Heavy
Weapons: Pistol
Weapons: Rifle
Weapons: Low-Tech
Weapons: Demolitions
Environmental Training
Lockpicking
Multitooling
Medicine
Computer
Swimming

So if you wanted to have the player be Advanced in heavy weapons, a Master of medicine, Trained in swimming, and Untrained in everything else, you would have Skills=2;0;0;0;0;0;0;0;3;0;1. You need to end the list with two semicolons (;;). You can leave skills off the end if you don't need them and they will be set to Untrained. For example, if you just wanted to have the Pistol skill set to Trained:

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Skills=0;1;;Map=MyMod_40_FirstMap.dx")

9. Set initial augmentations (optional)

You may want to start the player with some augs right off the bat. You do that with Aug= in your Description section:

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Aug=DeusEx.AugHealing(3);DeusEx.AugBallistic(1);DeusEx.AugCloak;;Map=MyMod_40_FirstMap.dx")

This is the same example from the DeusExML docs, so... this will give the Player the Regeneration Aug at level 4, the Ballistic Aug at level 2, and the Cloak Aug at Level 1. Notice that the values in paranthesis are one less than the actual level of the Aug.

10. Set custom splash map (optional)

If you really want to get fancy, you can use your own "splash" map that plays behind the New Game windows. You could put your own logos and/or mod name back there and set up your own music. This is strictly cosmetic and will only be seen when your mod is first started.

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Splash=MyModSplash.dx;Map=MyMod_40_FirstMap.dx")

11. Misc

If you use ALL of these options, the line in your .int file could get pretty long, but it shouldn't be a problem. For example, here's a .int file that uses just about everything:

[Public]
Object=(Name="My Mod", Class=Class, MetaClass=DeusExML.MLGameInfo, Description="Action=Start;
  Inv=DeusEx.WeaponProd;DeusEx.AmmoBattery(2);; Class=MyPackage.BugsBunnyPlayer;
  Credits=1500; SkillPts=5000; Skills=0;1;; Aug=DeusEx.AugHealing(3); Splash=MyModSplash.dx;
  Map=MyMod_40_FirstMap.dx")

Note that spaces after each semicolon is fine. That can help with word wrapping.

HINT: You can put as many Object= lines in your .int file as you want. That can be helpful when testing maps, since you can set up several entry points into your mod.

12. Packaging your files

Here's where things get messy. Since you can't assume where the player has installed Deus Ex, you really can't just zip up all your files and tell the player to unzip them with the same directory structure. I suppose you could get tricky with relative folders and such, but that starts getting messy for the player as well. You *could* just ask the player to copy all of the files into the appropriate places, but that doesn't seem very friendly.

Another option is to use an Unreal feature called a UMOD file. You can use it to bundle all of your files together and run an installation program (possibly from a .bat file). I haven't tried that yet, but it's potentially the best option. I'll be posting a tutorial on that in the future.

In the mean time, if anyone has any other suggestions on the best way to package files, let me know: stack@planetdeusex.com.


Using the NSIS Installer

Prerequisites:
The Basics

Overview:
When you're done with your Deus Ex levels and you want to distribute them by posting your mod on an FTP or web site (or simply e-mail it to someone), you have several options. If you're just sending it to a couple of friends, and they are comfortable with manually installing all of the elements (maps, texture package, .u packages, etc), you could just put everything in a .ZIP file and send it out.

However, if you're aiming for a wider distribution and want a more user-friendly install process, you can use a utility to create an "installer" program. There are a number of commercial products, such as InstallShield, that let you do that, but there's also a completely free one called NSIS. It stands for Nullsoft Scriptable Install System. You may have heard of Nullsoft, since they also make the Winamp MP3 program.

NSIS allows you to compress all of your elements into a single .EXE file. When the person that downloads your mod runs the .EXE file, an installation "wizard" appears and the installer will extract the files and copy them to the correct locations. This does require a certain amount of work on your part. To set everything up, you create a .NSI file, which is just a text file that sets everything up. If you have the "MakeNSIS" utility installed, you then just right-click on your .NSI file in File Exporer and select "Compile NSI".

As you might guess, setting up the .NSI file is the hard part. There's quite a bit you can do, so a full-blown tutorial is a bit outside of what I can cover here. At some point, I may release a set of example files, however.

In the mean time, if you want to check it out, click on the link below.

Thanks to Brian McCafferty for pointing me to this cool utility.

Download:
You can download NSIS here.


UnrealScript: Please read

About the UnrealScript section

The UnrealScript section is different from the other sections on this site. I try to make the mapping, ConEdit, and importing tutorials step-by-step guides that build on each other to form kind of a crude Deus Ex SDK "manual." But presenting UnrealScript programming that way doesn't really make sense. If you'd like to learn script programming, I would suggest reading the UnrealScript Language Reference (several times if necessary!), vistiting the Coder's Corner at www.deus-ex.org, and checking out the coding tutorials at sites like Deus Ex Ed and DX Editing. If you're new to object-oriented programming, I would also suggest learning the basics of Java, especially how inheritance works.

I'm planning on putting solutions to specific, practical problems in the UnrealScript section. I do assume that you know how to build these into your own packages. There won't be a lot of hand-holding, but hopefully those that know what to do with the code will find something useful.


Creating a custom player class

Creating a custom player class (for use with the Team UC Mod Loader)

Prerequisites:
The Basics
How to add custom packages
Installation of the Team UC Mod Loader

Overview:
A common question that comes up is: "Can I change the player's character to look like someone else?" The answer is "Yes". The way you do it is by setting up a custom player class and specifying a different model or skins in that class. Custom player classes let you do other things too, but those types of things typically require some coding knowledge. This tutorial covers how to use custom player classes with the Team UC Mod Loader and includes an example player class file, an example map, and an example Mod Loader .int file.

Download:
Download example files (5K)
You will need to compile the included .uc file into a package before the example will work. Be sure to unzip the files into the corresponding folders as stored in the zip file.

1. Download and install the Team UC Mod Loader

For this tutorial, you'll need to install the Team UC Mod Loader. For more information, see my Team UC Mod Loader tutorial.

If you haven't done so already, you'll need to add this line to the [Editor.EditorEngine] section of your DeusEx.ini file (which is in your \DeusEx\System folder):

EditPackages=DeusExML

Be sure to add it before any EditPackages lines that you've added previously. That line is not needed to simply use the mod loader, but it is needed when compiling new code that references stuff in the mod loader code.

2. Create your custom player class

You'll need to create a .uc file in your \DeusEx\MyPackage\Classes folder (where MyPackage is the name of your package) to define your custom player class. In this example, the file would be called LeroyBrownPlayer.uc. If you aren't into coding, don't worry about it - just use this as an example of what to put in the file and you should be fine:

//=============================================================================
// LeroyBrownPlayer.
//=============================================================================
class LeroyBrownPlayer extends MLPlayer;

event TravelPostAccept()
{
    Super.TravelPostAccept();

     MultiSkins[0]
  = Texture'DeusExCharacters.Skins.ThugMaleTex0';
MultiSkins[3] = Texture'DeusExCharacters.Skins.ThugMaleTex0';
}

defaultproperties
{
CarcassType=Class'DeusEx.ThugMaleCarcass'
Mesh=LodMesh'DeusExCharacters.GM_Trench'
MultiSkins(0)=Texture'DeusExCharacters.Skins.ThugMaleTex0'
MultiSkins(1)=Texture'DeusExCharacters.Skins.ThugMaleTex2'
MultiSkins(2)=Texture'DeusExCharacters.Skins.ThugMaleTex3'
MultiSkins(3)=Texture'DeusExCharacters.Skins.ThugMaleTex0'
MultiSkins(4)=Texture'DeusExCharacters.Skins.ThugMaleTex1'
MultiSkins(5)=Texture'DeusExItems.Skins.PinkMaskTex'
MultiSkins(6)=Texture'DeusExItems.Skins.GrayMaskTex'
MultiSkins(7)=Texture'DeusExItems.Skins.BlackMaskTex'
BindName="LeroyBrown"
TruePlayerName="Leroy Brown"
FamiliarName="Leroy Brown"
UnfamiliarName="Leroy Brown"
}

Save this in your \DeusEx\MyPackage\Classes folder as LeroyBrownPlayer.uc. If you're using the example files "as is", you'll want to add an EditPackages=MyPackage line to the [Editor.EditorEngine] section of your DeusEx.ini file. You should already be familiar with setting up custom packages before continuing.

In this case, Mesh=LodMesh'DeusExCharacters.GM_Trench' is redundant, since the base class is already set to that mesh. So what does that mean? GM_Trench is the model (mesh) that several characters use, including JC Denton. By specifying different MultiSkins values though, different character textures (skins) will be applied.

You'll need to set the 0 and 3 MultiSkins values in the TravelPostAccept function as shown above. It has to do with the custom skins that you select at the beginning of a game. If you know a bit about coding, you can even set it up so that the player can pick a custom portrait at the start of your mod and then set the appropriate skin in that function.

So... how exactly do you set the model and skins to a particular character from the game? To find out which values to set, pull up that NPC's player class. If you've never done an "Export All" in UnrealEd, pull it up and push that button. That exports all of the UnrealScript code into various folders under your \DeusEx folder. If you look under \DeusEx\Classes\Classes, you'll see a *bunch* of .uc files. Pull up the .uc file for the character you want the player to look like, and set the same Mesh and MultiSkins values. For example, pull up ThugMale.uc and you'll see where I got the above settings.

You can also set any of the MultiSkins values to your own custom-made textures. And if you're *really* hard core, you could even use your own character mesh, but that would be a huge amount of work.

NOTE: Not all character models have as much animation as GM_Trench. That doesn't seem to cause any problems, but it can look weird.

NOTE: You'll also want to change the CarcassType to an appropriate class, so that the correct mesh and textures are displayed on the player when dead. If you're using your own custom skins, see How to re-skin character meshes for more info on carcass classes.

3. Compile your package

Now just do your "ucc make" to build your new player class into your package. But you're not done yet. You have a new player class, but you haven't told the game engine to use it. Read on.

4. Create a .int file for your mod

Create a new text file with a .int extension and save it in your \DeusEx\System folder. The one included in the example files is called CustomPlayerTutorial.int. Type this in, but replace the appropriate items as needed:

[Public]
Object=(Name="Custom Player Test", Class=Class, MetaClass=DeusExML.MLGameInfo,
  Description="Class=MyPackage.LeroyBrownPlayer; Map=CustomPlayerTutorial.dx")

For more detailed info on setting up .int files for the Team UC Mod Loader, click here.

That's it. Fire up Deus Ex and select "Custom Player Test" or whatever you put in your .int file.

If you're trying it with the example files, you'll be in a hallway with a mirror at the end. If you look in the mirror, you'll see this lovely mug staring back at you:


Creating a custom player class

Creating a custom player class (without the Mod Loader)

Prerequisites:
The Basics
How to add custom packages

Overview:
A common question that comes up is: "Can I change the player's character to look like someone else?" The answer is "Yes". The way you do it is by setting up a custom player class and specifying a different model or skins in that class. Custom player classes let you do other things too, but those types of things typically require some coding knowledge. This tutorial covers how to use custom player classes WITHOUT using the Team UC Mod Loader. This is not recommended, but I'm providing the information for those who want to know how. It includes an example player class file, GameInfo class file, and an example map.

If you're planning on distributing a mod that uses a custom player class, please consider using the Team UC Mod Loader as described here.

Download:
Download example files (5K)
You will need to compile the included .uc files into a package before the example will work. Be sure to unzip the files into the corresponding folders as stored in the zip file.

1. Create your custom player class

You'll need to create a .uc file in your \DeusEx\MyPackage\Classes folder (where MyPackage is the name of your package) to define your custom player class. In this example, the file would be called WaltonSimonsPlayer.uc. If you aren't into coding, don't worry about it - just use this as an example of what to put in the file and you should be fine:

//=============================================================================
// WaltonSimonsPlayer.
//=============================================================================
class WaltonSimonsPlayer extends JCDentonMale;

event TravelPostAccept()
{
    Super.TravelPostAccept();

     MultiSkins[0]
  = Texture'DeusExCharacters.Skins.WaltonSimonsTex0';
MultiSkins[3] = Texture'DeusExCharacters.Skins.WaltonSimonsTex0';
}

defaultproperties
{
CarcassType=Class'DeusEx.WaltonSimonsCarcass'
Mesh=LodMesh'DeusExCharacters.GM_Trench'
MultiSkins(0)=Texture'DeusExCharacters.Skins.WaltonSimonsTex0'
MultiSkins(1)=Texture'DeusExCharacters.Skins.WaltonSimonsTex2'
MultiSkins(2)=Texture'DeusExCharacters.Skins.PantsTex5'
MultiSkins(3)=Texture'DeusExCharacters.Skins.WaltonSimonsTex0'
MultiSkins(4)=Texture'DeusExCharacters.Skins.WaltonSimonsTex1'
MultiSkins(5)=Texture'DeusExCharacters.Skins.WaltonSimonsTex2'
MultiSkins(6)=Texture'DeusExItems.Skins.GrayMaskTex'
MultiSkins(7)=Texture'DeusExItems.Skins.BlackMaskTex'
BindName="WaltonSimons"
TruePlayerName="Walton Simons"
FamiliarName="Walton Simons"
UnfamiliarName="Walton Simons"
}

Save this in your \DeusEx\MyPackage\Classes folder as WaltonSimonsPlayer.uc. If you're using the example files "as is", you'll want to add an EditPackages=MyPackage line to the [Editor.EditorEngine] section of your DeusEx.ini file. You should already be familiar with setting up custom packages before continuing.

In this case, Mesh=LodMesh'DeusExCharacters.GM_Trench' is redundant, since the base class is already set to that mesh. So what does that mean? GM_Trench is the model (mesh) that several characters use, including JC Denton. By specifying different MultiSkins values though, different character textures (skins) will be applied.

You'll need to set the 0 and 3 MultiSkins values in the TravelPostAccept function as shown above. It has to do with the custom skins that you select at the beginning of a game. If you know a bit about coding, you can even set it up so that the player can pick a custom portrait at the start of your mod and then set the appropriate skin in that function.

So... how exactly do you set the model and skins to a particular character from the game? To find out which values to set, pull up that NPC's player class. If you've never done an "Export All" in UnrealEd, pull it up and push that button. That exports all of the UnrealScript code into various folders under your \DeusEx folder. If you look under \DeusEx\Classes\Classes, you'll see a *bunch* of .uc files. Pull up the .uc file for the character you want the player to look like, and set the same Mesh and MultiSkins values. For example, pull up WaltonSimons.uc and you'll see where I got the above settings.

You can also set any of the MultiSkins values to your own custom-made textures. And if you're *really* hard core, you could even use your own character mesh, but that would be a huge amount of work.

NOTE: Not all character models have as much animation as GM_Trench. That doesn't seem to cause any problems, but it can look weird.

2. Create your custom GameInfo class

Create another .uc file in your Classes folder. Call it MyGameInfo.uc and put this in it:

class MyGameInfo extends DeusExGameInfo;

function bool ApproveClass(
  class<playerpawn> SpawnClass)
{
return true;
}

3. Compile your package

Now just do your "ucc make" to build your new player class and GameInfo class into your package. But you're not done yet. You have a new player class, but you haven't told the game engine to use it. Since we're not using the Mod Loader, you also need to tell the engine to use your new GameInfo class as well. Read on.

4. Edit the User.ini file

Pull up the User.ini file that's in your \DeusEx\System folder. In the [DefaultPlayer] section, change your Class= line to:

Class=MyPackage.WaltonSimonsPlayer

5. Edit the DeusEx.ini file

Pull up the DeusEx.ini file that's in your \DeusEx\System folder. In the [Engine.Engine] section, change your DefaultGame= line to:

DefaultGame=MyPackage.MyGameInfo

NOTE: If you have the Mod Loader installed, be sure and change this back to DefaultGame=DeusExML.MLGameInfo when you're done playing around.

Now you'll need to play a map to try it out. Since you're not using the Mod Loader, I'll guess you'll have to fire up UnrealEd and load in a map or something!

If you're trying it with the example files, you'll be in a hallway with a mirror at the end. If you look in the mirror, you'll see this lovely mug staring back at you:


Scrolling End Credits

Put this code in your custom player class (click here to download this fragment):

// ----------------------------------------------------------------------
// ShowCredits()
// This is stuff for setting up custom end credits
// ----------------------------------------------------------------------

function ShowCredits(optional
  bool bLoadIntro)
{
local DeusExRootWindow root;
local MyCreditsWindow winCredits;

    root = DeusExRootWindow(rootWindow);

     if
  (root != None)
{
// Show the credits screen and
  force the game not to pause
// if we're showing the credits
  after the endgame
winCredits = MyCreditsWindow(root.InvokeMenuScreen(Class'MyCreditsWindow',
  bLoadIntro));
winCredits.SetLoadIntro(bLoadIntro);
}
}

Put this code in a file called MyCreditsWindow.uc:

//=============================================================================
// MyCreditsWindow
//=============================================================================
class MyCreditsWindow extends CreditsWindow;

var string textPackage;

// ----------------------------------------------------------------------
// ProcessText()
// ----------------------------------------------------------------------

function ProcessText()
{
    local DeusExTextParser parser;

    PrintPicture(CreditsBannerTextures, 2, 1, 505, 75);
    PrintLn();

     //
  First check to see if we have a name
if (textName != '')
{
// Create the text parser
parser = new(None) Class'DeusExTextParser';

         //
  Attempt to find the text object
if (parser.OpenText(textName,textPackage))
{
while(parser.ProcessText())
ProcessTextTag(parser);

            parser.CloseText();
        }

    CriticalDelete(parser);
    }

    ProcessFinished();
}

defaultproperties
{
    CreditsBannerTextures(0)=Texture'DeusExUI.UserInterface.CreditsBanner_1'
    CreditsBannerTextures(1)=Texture'DeusExUI.UserInterface.CreditsBanner_2'
    TeamPhotoTextures(0)=Texture'DeusExUI.UserInterface.TeamFront_1'
    TeamPhotoTextures(1)=Texture'DeusExUI.UserInterface.TeamFront_2'
    TeamPhotoTextures(2)=Texture'DeusExUI.UserInterface.TeamFront_3'
    creditsEndSoundLength=4.000000
    maxRandomPhrases=5
    ScrollMusicString="Credits_Music.Credits_Music"
    textName=MyCredits
    textPackage=MyPackage
}

You can set the CreditsBannerTextures values to a 2-image custom logo, the TeamPhotoTextures to a 3-image picture, the ScrollMusicString to specific what music to play, and the textPackage to the name of the package you will be building the credits text into.

To set up the credits, use a text file called MyCredits.txt (or whatever you want to put as the textName value) and build it into your package. Follow the same procedure that you would use to build text for your own DataCubes, e-mail, etc, as described in How to add a personal computer.

To use this, do the following in the final mission script for your levels at the point where you want the credits to roll, where MyCustomPlayer is the name of your player class:

local MyCustomPlayer
  MyPlayer;
MyPlayer = MyCustomPlayer(GetPlayerPawn());
MyPlayer.ShowCredits(True);


Custom Computer Nodes

UPDATE: I have posted a fixed version of this little mod on 11/14/2001. I recently discovered and fixed a bug which causes a GPF if the player hacks into a security computer and then logs off. It works correctly now!

Overview:
You may or may not have noticed that when adding a security or personal computer to your maps, you can't set your own text or logo textures. To see what your options are without any extra coding, see Setting Up Computers. Although there are titleString, titleTexture, and nodeName values that you can set, they were never implemented. The following code will implement all of those, plus add a new value that you can set: nodeAddress.

To download all eight script files, click here. (5K)

Just copy those files to your Classes folder for one of your packages and replace any references to "MyPackage" to the name of your package. If you know what you're doing, you can also rename these files to whatever you want, as long as you change all of the appropriate references.

After building these into your package, you can add MyComputerPersonal and MyComputerSecurity items to your maps, and you'll be able to customize the login windows. If you fill in the titleString, titleTexture, nodeName, or nodeAddress values, that will override whatever would normally be set when you select a ComputerNode value.

The titleTexture is the logo in the upper-right corner - for these to look right, you'll want to only use the top left 61 x 61 pixels. The rest should be set to the "Index 0" palette color so that that part will be transparent. For more information on creating masked textures, click here.

The titleString is the text line that appears below the User Name and Password - in the example below it is "Central Intelligence Agency (CIA)".

The nodeName is what appears after "Welcome to" in the title - in this case "CIA Headquarters".

Finally, if you expand "MyComputers" in the properties, you'll see a new value called nodeAddress. In this case it was set to "1234.666".


Colored Lighting Guide

Thought it might be handy to have a quick-and-dirty color chart for setting up colored lighting. Use these values in the LightColor properties to set a light's color at maximum brightness. Adjust the LightBrightness value down for a dimmer light and increase the LightSaturation value to mix in white light.

For white lights, keep the LightSaturation set to 255 and only adjust the LightBrightness value (the hue is irrelevant if the saturation is maxed out). To produce other colors, use a LightHue value in between what's on this chart. For instance, for a greenish-yellow color, use 60, since that's halfway between the yellow and green hue values.

COLOR | LightBrightness | LightHue | LightSaturation
White | 255 | 0 | 255
Red | 255 | 0 | 0
Orange | 255 | 20 | 0
Yellow | 255 | 40 | 0
Green | 255 | 80 | 0
Cyan | 255 | 120 | 0
Blue | 255 | 160 | 0
Purple | 255 | 200 | 0


Augmentation Pairs List

In no particular order, here's a list of the pairs of augmentations that were used in the real game. These are the values that you type in the AddAugs properties of an AugmentationCannister actor. There's nothing to prevent you from using other combinations, or even providing only a single aug in an augmentation cannister, but the augs were designed with these pairs in mind.

AugCloak AugRadarTrans | AugDefense AugDrone | AugPower AugHeartLung
AugAqualung AugEnviro | AugTarget AugVision | AugSpeed AugStealth
AugMuscle AugCombat | AugEMP AugBallistic | AugHealing AugShield


Misc Tips

Misc. Tips & Tricks

Prerequisites:
The Basics

Overview:
Here are some random "tips & tricks". Also see Brush Tips for specific tips dealing with brushes. I'll update this page as I discover more tips.

Contents:
1. Grabbing a texture from an existing surface
2. Clearing out all references to a particular texture

1. Grabbing a texture from an existing surface

If you have a map opened and you want to select one of the textures you see in the 3D view, you can select it without having to search through dozens of texture packages.

First, select the surface by left-clicking on it.

Then, hold the Alt key down on the keyboard and right-click on the same surface. The texture is now selected.

You can now apply that texture to another surface by right-clicking on it and selecting "Apply Texture XXX".

2. Clearing out all references to a particular texture

If you've got a custom texture that you want to completely get rid of in your map (or for some reason you just want to clear out a particular texture), there's a very quick way of doing it.

In the Texture browser, find the texture and select it. Now just hit the "Q" key on your keyboard. You're done!


Brush Tips

Prerequisites:
The Basics

Overview:
Here are some random "tips & tricks" for working with brushes. Read up and avoid some of the common pitfalls, such as windows that won't break, textures on doors that are scaled weird, lighting anomalies, poor performance, and unexpected "holes".

Contents:
1. Do not scale the initial brushes before making a mover
2. Properly placing the pivot point of mover brushes
3. Avoiding "black door" syndrome
4. Using semi-solid brushes to boost performance
5. Avoiding "holes" in complex brushes
6. Controlling the order of CSG brushes
7. Fixing button slippage on movers

1. Do not scale the initial brushes before making a mover

One of the most frustrating things that can happen when creating mover brushes is when you end up with a nonfunctional DeusExMover, such as a door that won't open or a window that won't break. I discovered the hard way that scaling your initial brush (or brushes) with any of the brush scaling tools is usually the cause of the problems.

Though it's a royal pain in the rear, get in the habit of only using the properties windows (such as Cube Properties) to size the red brush before creating your initial subtraction and addition brushes. If you DO scale one of your initial brushes after it's been created and then do your intersect and create your mover, your mover will likely be screwed up beyond repair.

To see if a mover brush has been scaled, right-click on it and pull up its properties. Expand Brush -> MainScale -> Scale and Brush -> PostScale -> Scale. If all of the X, Y, and Z values are not 1.000, you have a problem. Unfortunately, the only way to fix it is to either change the scale values back to 1.000 (almost never what you want, since you probably scaled it for a reason!) or build your initial brush or brushes from scratch, and build another mover.

2. Properly placing the pivot point of mover brushes

To get a door to work properly, it's important to know how to set up its pivot point correctly. Moving the pivot point on a mover after it's been created is not a good idea as it can cause weird texture scaling problems.

The technique for setting up the position of the mover's pivot point is easier to show than describe:

This is an overhead 2D view in UnrealEd of an addition brush ready to be used as a door template for a DeusExMover. The red brush is positioned so that ITS pivot point lines up with where the mover's pivot point will be at the door's "hinge". | After the "intersect" is done and the mover created, you'll see that the mover brush is ready to be used as a swinging door, due to the proper placement of the pivot point.

Do NOT move the pivot point of a mover brush after it is created. You will run into weird texture scaling issues and swinging doors may act funny. Here's an example of texture weirdness on a mover. The first brush shown here is the original addition brush, the second is a "clean" mover based on that brush, and the third is another mover based on the original brush, but with its pivot point modified after the mover was created. It seems that the texture scaling is reset when you do that:

3. Avoiding "black door" syndrome

Ever run into this one?

This side of the door looks fine, since this room is lit. This is the Keyframe 0 (closed) position. | But the room on the other side is not lit, so when the door is opened, it looks weird. This is the Keyframe 1 (open) position.

There are three main ways of fixing this. Which solution you choose depends on the situation and what you're trying to achieve.

Solution 1: The reason the back of the door is black is that by default, the surfaces of a mover brush (and any surfaces on nearby geometry) are lit based on the brush's position at Keyframe 0. So an easy solution if your mover is a door to a locker or it's a drawer or something, is to simply put a light inside the locker or drawer.

Solution 2: If you don't actually want to add extra lighting behind the mover, you can instead alter which keyframe is used to light the mover's surfaces as well as surrounding surfaces. Right-click on your mover brush and expand Mover. Set the WorldRaytraceKey to the keyframe to use as the lighting reference. For this example, setting it to 1 will cause the door to be lit in its "open" position, even though the door will initially be closed. It will also cause some light to bleed into the other room, which might look a little weird when the door is shut.

NOTE: There's also a BrushRaytraceKey value you can set, which I think is supposed to only affect the brush. I've had limited success with that though. If you know a way to coerce that setting to work, let me know, as that could be quite handy.
With the WorldRaytraceKey set to 1, the other side of the door is now lit, but so is some of the other room, regardless of whether the door is open or closed. Could be another good solution for a locker or drawer, but it may not be so great for a room.

Solution 3: An interesting alternative is to set up your mover to react to lighting dynamically. For this example, I think that will work the best, though it may mean adding an extra light if we want BOTH sides of the door lit when it is open. (it's hard to light two sides of a thin object with a single light) Just pull up the mover brush's properties and set the Mover -> bDynamicLightMover to True. Now the mover will react to normal lights dynamically and will look more realistic, without affecting the lighting in the other room.

Ah, that's more like it. Now the side of the door facing the dark room will fade to black when the door is closed and light up when it's open.

4. Using semi-solid brushes to boost performance

Semi-solid brushes are very similar to "additive brushes", but with one crucial difference. They don't create what are called "BSP cuts", which reduces the "node count" of your map. Basically, they are used to make your map more efficient, which boosts your frame rate. They still appear exactly the same to the player, and will still block the player and pawns.

For the same reason semi-solid brushes boost performance, they cannot be used as "subtract" brushes, nor can anything be subtracted from them. So only single brushes are good candidates to make into semi-solid brushes.

While you can make semi-solid brushes with the Add Special button, I prefer to simply right-click on an existing additive brush and select "Make Semisolid" from the Solidity menu. You can always switch a brush back if you run into any issues.

Some examples where you might consider using semi-solid brushes:

Support beams
Roof trusses
Electrical conduits
Any single decorative brush
Legs of a table
Office cubicle walls

Some other general guidelines:

* For some reason, if you have two semi-sold brushes that touch each other, weird things can happen, so try to avoid that.
* If you have a large, odd-shaped brush that is meant to support the player, sometimes it's better not to make that a semi-solid brush. I once had a large disc-shaped semi-solid brush that the player could walk on, and every once in a while it was possible to "fall through" the brush.

5. Avoiding "holes" in complex brushes

After you start making more complicated brushes, such as terrain and rocks and that sort of thing, you may run into a problem where sections of your brushes appear invisible when your map is played. While these types of "holes" can reportedly be caused by too many polygons (or perhaps too many subtract brushes?) in your map, I've run into other situations that have nothing to do with the number of polygons or brushes.

First of all, if any polygons in a brush are "flipped" the wrong way, you'll be able to see right through them. I purposely flipped a couple of polygons in a model using a 3D modeling package and then imported the model as a brush into UnrealEd to illustrate this. If you import brushes from .DXF files, that's something to look out for. Most modeling software includes tools for viewing and fixing that situation.
Watch out for "flipped" polygons if you import brushes from .DXF files.

I once ran into a situation where a brush used for a small hill had several of these holes in it for no apparent reason. The polygons were NOT flipped the wrong way. I had set up the start of the hill to be flush with the "ground" that was created by a subtract brush, and for some reason, that caused problems. After much experimentation, what finally fixed it was lifting the edge up a single unit. It seems that if too much of a multi-polygon brush (such as those created by the floor lofter) is touching another brush, strange things can happen. It also seems to help if the polygons are close to evenly spaced.
This is a side view of the edge of a "hill" brush zoomed in as far as possible. Lifting the edge of the hill up 1 unit fixed the holes problem and isn't really noticable in the game.

Some of these holes are quite mysterious, so if anyone has any additional insight, please let me know!

NOTE: If you're still running into holes, check out this BSP FAQ that has more information about these, which are sometimes called "BSP holes." There's also a lot of other good stuff in there about brushes and rebuilding geometry, etc.

6. Controlling the order of CSG brushes

I'm not going to go into a lot of detail here, but something to be aware of it is that you can control the "order" that CSG brushes operate. What's CSG? It stands for Constructive Solid Geometry, and is just a fancy way of describing the process of adding, subtracting, unioning, and intersecting 3D shapes to form other shapes. (it comes from the 3D animation/modeling world) In UnrealEd, it just refers to creating level geometry using addition and subtraction brushes.

Anyway, you may run into situations where you want, say, an additive brush to add geometry to your map, but you find that a subtraction brush is causing part of it to be carved out. If you want the subtraction to happen FIRST, you can change the order that the adds and subtracts occur by pulling up one of the brush's properties and selecting either "To first" or "To last" from the Order menu.

7. Fixing button slippage

As you may know, it's possible to "attach" an actor to a mover brush by setting its Movement -> AttachTag value to the tag name of the mover. Most of the time that works great. For example, you can attach buttons to a mover when creating an elevator.

A problem that doesn't usually crop up when doing a vertical elevator is a little glitch that causes attached actors to slip a little when the mover brush is in motion. If you're doing something like a subway car though, this glitch can happen quite easily.

The problem seems to be that the actor gets hung up a little when the player is standing in the way of the object's path. To fix this, set the buttons' (or other actors') Collision -> bBlockPlayers value to False.


Deus Ex 2 Editing

Getting Ready for Deus Ex 2 Editing

Last updated: 12/15/02

As far as I know, the developers *are* currently planning on releasing a DX2 SDK some time after DX2 ships. Since we don't even know when the game will ship (mid to late 2003?), we certainly don't know when the SDK will become available. This is what we do know for sure about DX2:

* It will use a highly modified version of the next-generation Unreal engine
* It will take advantage of real-time lighting and real-time shadows that are highly accurate
* It will incorporate lighting into gameplay, so that the player can hide from enemies in the shadows
* It will use an enhanced physics engine to allow for even more freeform (yet realistic) gameplay
* The developers are putting more emphasis on AI this time around, so there should be improvements there
* The story takes place about 15-20 years after DX1.
* You won't be playing JC Denton this time, but apparently a younger clone of JC (you can choose male or female)
* It's assumed that you saved Paul Denton in DX1 - he'll be alive and well in DX2
* Harvey Smith on DX2: "The vibe for the game is definitely Blade Runner meets the Matrix."

So what good does all of that do? Well, there are some educated guesses we can make. I think we can assume that they are using UnrealEd 3 to create the maps, since that's the editor for the next-gen Unreal engine. There will certainly have to be some equivalent of ConEdit to edit conversations. I get the impression that dealing with the Karma physics engine could end up being challenging.

To get your feet wet with UnrealEd 3, pick up a copy of Unreal Tournament 2003 (UT2003). While the DX2 classes, meshes, textures, etc won't be there, the basic mechanics of how to work with new things like static meshes and the terrain editor should give you a head start at least. Thankfully, this time a lot of the new features are covered in very detailed, well-written tutorials here:

Unreal Developer Network (UDN)

A few "fun facts" about the next-gen Unreal engine:

* Textures can now be up to 2048 x 2048. I have, in fact, seen a 2048 x 1024 texture in UT2003!

* Textures can now be imported using DirectX Texture Compression (DXTC). What the heck does that mean? It means that if you use that option, your textures will take up less disk space and less video memory. That's a good thing!

* In addition to 8-bit color (256 color) textures, you can now use 24-bit color textures (16 million colors). Though I believe 8-bit color textures will still be common, there are times when 24-bit is the way to go. For instance, complex color gradients in a large sky texture would benefit from 24-bit color.

* Smooth edges on masked textures is now an option, but does take some preparation.

* There is now optimized support for large, complex terrain. Yeah! And there's even a new type of light object called SunLight that is specifically designed for lighting up terrain (in most cases using only one light source).

* The new engine lets you use something called static meshes. These are also called hardware brushes. Why are these cool? For starters, let me quote from the static mesh tutorial at the above link:

"They are much faster, can handle many more polygons, are invulnerable to BSP holes and look better than normal brushes or vertex meshes"

But that's not all. If you used the same static mesh in your map 20 times (say, for the same type of door), the geometry is only in memory once. This is possible because they are always the same shape (no animation). Thus the term "static mesh". Movers are now a type of static mesh.

The important thing to realize is that you can use static meshes to build the level geometry itself, with much greater detail and precision that was previously possible.

You can use 3dx max or Maya to make static meshes. Also, the version of UnrealEd that comes with UT2003 has built-in support for importing UV-mapped Lightwave models directly into the game.

While you *can* convert regular brushes to static meshes in the editor by simply using the right-click menu, to really take advantage of the new engine, you'd want to use one of those high end packages. I did notice that UT2003 comes with Maya Personal Edition, but I don't know what the limitations are with that yet.

* Static meshes are stored in package files and are plopped into a map using the Static Mesh browser - which is essentially a built-in prefab browser. Cool.

* You can now see what movers look like in the 3D window of the editor! (as opposed to those silly purple outlines)

* Skeletal animation is now supported, which means that characters now have "bones" that can be animated in more complex ways than the "canned" animations of DX1. I believe you need to use the ActorX plug-in for 3ds max or Maya to create animated meshes in the new engine. (I think MilkShape 3D supports UT2003 animated meshes as well)

* You can now use several difference kinds of texture maps on objects. In fact, the new engine has support for "materials" - if you're familiar with 3ds max, Maya, Lightwave, or other 3D package that supports "materials" or "surfaces", then you already know the concept. Basically you can set up several types of textures that define different things on the same surface. You can have specular maps, self-illumination maps (aka "unlit" or "luminosity"), *real* environment mapping (much better faked reflections), and a ton of other stuff.

* Matinee is a new tool for creating fancy cinematics. Aside from much greater camera control, you can do stuff like fades in/out and even motion blur.

* New effects are now possible for doing things like better water surfaces, projected images, and a more extensive particle system for creating better smoke, fire, sparks, light beams, lightning, rain, snow, and tons more.

Basically, there's a lot of new stuff to learn, but at the same time, much fewer limitations.

"If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them."


Getting Animations into Deus Ex

Getting Models into Deus Ex

Dave Townsend

townsend@patriot.net

Legend Entertainment Company

703-968-5067

Last Update: 25 May 2001 by Steve Tack (for Deus Ex)

Deus Ex changes to original 3ds2unr document are in RED

Issues For Artists

Modeling

Models must be made up of a single 3D Studio object, which lives within the 256x256x256 coordinate space centered on the origin. (Setting the grid extents to –128..128 and turning on the grid is helpful here.) The model itself should be centered on the origin (0,0,0) because of how Unreal specifies the collision cylinders used to determine when objects are touching.

Object polygons shouldn’t intersect. The hardware supported by Unreal gets confused when polygons intersect, resulting in an unpleasant shimmering.

If your object is a character that will be carrying a weapon that will be separately modeled, place an extra polygon (the weapon triangle) in or on the part of the character where the weapon should be. This polygon will be invisible in the game; it’s just used to sync the weapon’s position with the character’s animation.

The conversion tool will only convert objects with sequence numbers in their names (Obj01, Obj02, ...). The object name itself is meaningless; it’s the sequence numbers that count. They must begin at 01 (even if that’s the only frame!) and you can’t have any “holes” in the sequence. (Under 3D Studio 4, it was easiest to use the “Snapshot” option; I’m not sure how 3DS MAX handles this.)

Objects that won’t be animated (e.g. 3rd person weapon views) should be in their own .3DS file (e.g. save the angreal of healing as AngrealHeal.3DS).

Animation

Make sure that all animation frames stay entirely within the 256x256x256 coordinate space.

The Unreal animators are typically designing their animations for 30-35 fps playback. Then, to save memory, they shave the animations down to 15-17 fps and let Unreal do the tweening.

Objects that are animated should have a separate .3DS file for each animation sequence (Run.3DS, Walk.3DS, Shoot.3DS, etc.). You probably want a separate directory for each animating character, so that each can have it’s own Run.3DS sequence.

Texture Mapping

You still use 3D Studio to do your texture mapping. However, there are some (pretty heavy) restrictions on what will actually show up in Deus Ex.

The only type of texturing that has any effect is using actual texture maps – bump maps, opacity maps, specular maps, etc. are meaningless. Furthermore, the bitmaps that you use as textures should be 256x256 pixels in size, and you can’t have more than nine of them for any one model. To conserve memory, you should use as few texture maps as possible. 3DS Max V2 allows you to map part of a material to your geometry; using this feature lets you squeeze many smaller texture maps together into one big bitmap.

Under most circumstances, the material names that you use in 3D Studio don’t matter. However, there are several pre-defined material names that you can use to get special effects when the model is imported into Deus Ex. The special names are:

SKIN | This texture will be assigned as the model’s Skin property in Deus Ex.
TRANSLUCENT | The polygons mapped with this texture will be marked as translucent, and can have their transparency set by the program.
TWOSIDED | The polygons mapped with this texture will be marked as two-sided, so the texture mapping will show up on both sides of the polygon. This works the same as 3ds2unr, which means the surface will also be set to "masked".
WEAPON | The polygon (there should be only one!) mapped with this texture will be marked as the weapon triangle. So it won’t be visible
TWOSIDEDNORM | This is the samed as TWOSIDED, except that the surface will be set to normal instead of masked.
UNLIT | The polygons mapped with this texture will be self-illuminating, meaning they will be brightly lit regardless of the light sources near it. An example is the part of the light switch in Deus Ex that is visible even in the dark.
FLAT | The polygons mapped with this texture will not be rendered with smoothing between polygons. That can be useful for certain types of surfaces.
ENVMAPPED | The polygons mapped with this texture will be rendered with the Unreal engine's simulated evironment mapped effect. An example is the windows on Jock's helicopter in Deus Ex. Be sure to use a texture with some detail and not a solid color, or the effect will not be visible.

Note that this naming convention applies to the material name itself; the filename of whatever TGA file you use as the bitmap is irrelevant.

NOTE: Because current Unreal tools will not be compatible with the Deus Ex formatted .3d files that this utility produces (such as UnrealFX), there will be no way of setting the special polygons, other than what is listed above. I may provide an enhancement in the future that will allow any valid combination of special polygon settings.

Converting to Deus Ex Format

Preparation

You’ll need a copy of the 3ds2de.exe conversion program, plus some way (Photoshop, Debabylizer, etc.) of converting TGA files to PCX format. A text editor (Notepad will do in a pinch) is also handy.

The conversion program expects an Deus Ex-like directory structure to exist before it will run. Specifically, you need:

1. a main Deus Ex directory (mine is c:\DeusEx), below which is a

2. project-specific directory (for example, c:\DeusEx\MyPackage), below which are

3. two directories, Models and Classes (e.g. c:\DeusEx\MyPackage\Models and c:\DeusEx\MyPackage\Classes)

This directory tree is what Deus Ex itself expects, so it may already be set up. If it isn’t, you’ll have to make it yourself before doing any conversions.

The converter is a Windows console application, meaning it runs by typing rather than pointing and clicking. Make sure that the 3ds2de.exe program is somewhere in your DOS path before you begin.

Using the Converter

Once you’re set up, using the converter is pretty simple. Just type 3ds2de, followed by an optional class name and one or more .3DS files, like so:

C:\>3ds2de Trolloc Walk.3ds Run.3ds Attack.3ds

The converter reads the given 3DS files, and produces a class file (Trolloc.uc) and model files (Trolloc_a.3d and Trolloc_d.3d) to be used by Deus Ex.

If this is the first time that you’ve run the converter, you’ll be prompted to select your project directory (i.e. the directory from item #2 in the preparation list (for me, c:\DeusEx\MyPackage). Once you’ve set this directory, you won’t need to set it again. If you do need to change it, because you’ve began a new project, just type

C:\>3ds2de –setproj

and you’ll be able to select another project directory.

When specifying 3DS files, you can use standard DOS wildcard characters (`?' and `*'). So, if all of those Trolloc animation sequences were the only 3DS files in the current directory, you could type:

C:\>3ds2de Trolloc *.3ds

The class name is just the name of the object that you’re converting (Trolloc, AngrealHealing, Myrddraal, etc.) and is used as the base filename for the converter’s output. If you’re converting an object with no animation, you can omit the class name, in which case the base name of the sole 3DS file is used as the class name. In other words, this:

C:\>3ds2de AngrealHeal.3ds

does what you probably want it to. However, if you try to convert more than one 3DS file at a time without supplying a class name, you'll be prompted to make sure that the class name inferred by the converter is correct. For example, omitting the "Trolloc" from the previous example is probably an error:

c:>3ds2de *.3ds

ClassName [Walk]?

You can just hit Enter to continue with that name, or type the correct name (Trolloc) first.

Be careful with your class names – the converter will happily overwrite existing files.

Converter Output

The converter will create three files:

1. ...\Models\ClassName_a.3d

2. ...\Models\ClassName_d.3d

3. ...\Classes\ClassName.uc

(where "..." is your project directory).

The .uc file will contain the appropriate UnrealScript commands to import your model, list its animation sequences, and set its textures.

Deus Ex needs all three files to use your model. The same three files are used by the Mesh Viewer (see below, and separate documentation) to view models.

NOTE: The scaling factor in the mesh import statements will default to 0.00390625 (1/256) in the generated .uc file. That is a Deus Ex specific change.

Fixing Texture Maps

Since the converter doesn’t read 3DS materials files, and Deus Ex requires PCX rather than TGA-format input, you have to manually help out the converter.

First, you need 8-bit PCX versions of all of the textures that you used in the model – use Photoshop, etc.

You then need to examine the .uc file in a text editor that can handle straight ASCII text – Notepad is fine. Look for the lines that begin with #exec TEXTURE IMPORT and note that each such line ends with a material name after a pair of slashes:

#exec TEXTURE IMPORT NAME=JSpider1 FILE=MODELS\Spider1.PCX GROUP=Skins // SpiderSkin

(The above should be a single line, but can’t be shown here legibly that way.)

Notice the reference to a Spider1.PCX file. Both Deus Ex and MeshViewer will need this file to properly display your model. It corresponds to whatever TGA file you used in the given material, SpiderSkin. You need to have this file name match the name of the material’s 8-bit PCX file, which you can do by either editing the .uc file directly, or renaming your PCX file to correspond with the name in the .uc file.

Using the above example, say that the SpiderSkin material was made with a SpiderSkin.TGA texture map. You’d convert that TGA file to and 8-bit SpiderSkin.PCX file. You could then either rename that file to Spider1.PCX (because that’s what the script is expecting), or edit the script to look for SpiderSkin.PCX instead of Spider1.PCX.

Conversion Errors and Warnings

You might encounter the following problems when converting:

can't find file

You referred to a file that doesn’t exist. Make sure you’ve typed the name and directory correctly.

No project directory found – exiting

The converter couldn’t establish a project directory, either because you cancelled out or there’s a problem in the system registry. Make sure that your project directory structure is correct, then try rerunning the converter with the –setproj option before attempting conversion again. The converter cannot run without a project directory.

read error [TAG]

The converter was expecting data that wasn’t there. This probably means the 3DS file is corrupted.

too many textures

Unreal has a limit of ten materials that can be applied to an object, and the converter encountered an eleventh material. For memory and rendering performance reasons, you really should be using less than ten anyway.

Warning: out of sequence obj (Foo) skipped

The converter expects to find sequentially numbered objects in file, and it found an object either without a sequence number (e.g. Box instead of Box01) or with an out-of-sequence number (e.g. Box01, Box02, Box04). This is probably something you want to fix, although in some cases, like leaving a stray light source in the project, it might be OK to ignore (providing that the correct object was converted).

Warning: Filename.3DS: Bad coordinate x.xxxxx, y.yyyyy, z.zzzzz

The converter found a coordinate that was outside the allowable 256x256x256 coordinate space. Rescale your model or fix the animation sequence. To minimize warning lines, only one bad coordinate is reported per object in the file.

If you encounter errors other than those listed here, it probably indicates a converter bug.


Tack's Deus Ex Mesh Tool

Tack's Deus Ex Mesh Tool - current status

This utility has two main parts:

1. Mesh extractor

Features:
Graphical user interface.
Mesh extraction to Lightwave 6.5 format, including UV texture mapping.
Mesh extraction to MilkShape 1.4.x format, including UV texture mapping.
Automatic export of textures to .PCX format (for textures in the same package as the mesh).
Deus Ex character skins can be automatically exported as well.
Animation support via multiple output files.

Still to do:
Animation support using Lightwave Endomorphs (maybe someday)
Support for 2-sided, translucent, and weapon polygons (setting of surface names and/or attributes)

Status: I'm basically done with this piece for now.

2. Direct mesh conversion for Lightwave 6.5 (and possibly MilkShape)

Description: Ideally, this will allow UV texturing and animating to be done in Lightwave and the results exported directly to Deus Ex mesh files. I'll also try to include better .uc file generation, including some specific Deus Ex things, like calculation of collisionHeight and collisionRadius. This will be designed to support re-importing of altered meshes that were extracted. Without this converter, there will be no practical way of re-importing animation based on the original animation. Plus it will allow Lightwave artists to model, texture, and animate completely within Lightwave, with no other utilities necessary.

Status as of 11/24/01: I'm around 60% complete, with the core functionality (the hard stuff) in place. I've reworked much of the user interface and I've come up with a way to handle animation that should be flexible enough.

Probable modeling and animation restrictions

Update #3 (11/24/01): I haven't worked on it for almost three months, but I finally dusted it off and it turns out I was about an hour away from solving the last of my UV conversion problems. Woo hoo! I should be able to make major progress now, as the "meat" of the conversion code is now basically complete.

Steve Tack
stack@planetdeusex.com


Screen shots of extracted models

This screen shot is from the LightWave 6.5 modeler; these are meshes extracted from Deus Ex package files with my mesh tool.

You can also export to MilkShape format:

The black, gray, and purple areas correspond to areas that will render transparent or translucent in the game. That's why JC's glasses don't look right in this picture.

The "pickup" and "3rd person" versions of the weapon meshes include the entire weapon, but have lower resolution textures:

The "1st person" versions of the weapon meshes only include what will be seen from the player's viewpoint. They include JC's hand(s) and have higher resolution textures.

Steve Tack
stack@planetdeusex.com


Lightwave converter restrictions

Modeling

Only 3-point polygons are allowed; that is what is supported by the Unreal engine. You'll want to double-check that in Lightwave modeler before attempting any conversions. (in LW Modeler, switch to polygon mode and hit "W" for polygon statistics, select any polygons with more than three sides and hit "Shift-T" to convert them to 3-point, and delete any 1-point or 2-point polys)

Only one layer is allowed per .LWO file. Also, layer names are not allowed, which shouldn't be a problem when you only have one.

Only color maps are applicable. The other types, such as diffuse, luminosity, specularity, and bump maps are not supported by the version of the Unreal engine that Deus Ex uses.

The only mapping type that is supported is UV. Keep in mind that Lightwave does let you generate your initial UV maps in Lightwave based on planar, cylindrical, spherical, or "atlas" types, so that shouldn't be too limiting.

Only image maps will show up in the game. Procedural textures cannot be supported. Note that the base color will not show up at all - only the image map. So if you need a solid colored surface, you'll have to provide a solid-colored texture.

Only a single UV map per surface is allowed. Again, that's simply how the Unreal engine works. You can have up to 8 surfaces though.

Only one weapon triangle per model should be set up.

Animated textures are supported. You'd just have to set the textures up correctly when importing them.

Animation

The X, Y, and Z coordinates used in Lightwave Layout are ignored. The initial position of your converted model in a Deus Ex map is set in UnrealEd, and of course some Actor classes are set up to move around in the map during gameplay. You can still animate a model so that it moves relative to its center position using bones or morphing (like when animating the recoil of a weapon perhaps).

An animated mesh must originate from a single Lightwave model. That means that you will not be able to "parent" one object to another. It's not so bad though, since you can still use any of the following to animate your model:

Bones (including Skelegons, use of weight maps, IK, etc)
Morphing
MorphMixer (both straight morphing and MorphMixer support unlimited morph maps)
SockMonkey
Displacement maps (static or animated)
Any option in the Deformations tab of an object, including all displacement plug-ins
(this includes the deformation plug-ins like bend, pole, shear, taper, twist, vortex)
Motion Designer (needs to be tested, but should work!)

In order to generate a set of .LWO files from Lightwave Layout in the format that the converter needs, you'll have to use the MorphSaver plug-in. Don't worry, it comes with Lightwave. (you'll likely need to add the SaveMorf.p plug-in to Layout - it's in the \Plugins\Animate folder) It's a little confusing, since the plug-in is named SaveMorf, but the dialog boxes refer to it as MorphSaver. Once installed, "SaveMorf" will show up as a Displacement plug-in when accessing a model's object properties. (displacement plug-ins are set up from the Deformations tab in the Object Properties window)


Minigun Details

The "Predator" style mini-gun model is something I did one day just screwing around. It's based off of a high poly model that I got here: http://www.ozemail.com.au/~dproc/

The poly count is still quite high for a weapon (763 polys!), so it probably still needs to be reduced some. Also, it has not been textured or animated. If anyone does end up using it, you may want to give the original model's author some credit (see the above link).


NOTE: you will need to paste this into your custom player class file

// ----------------------------------------------------------------------
// ShowCredits()
// This is stuff for setting up custom end credits
// ----------------------------------------------------------------------

function ShowCredits(optional bool bLoadIntro)
{
    local DeusExRootWindow root;
    local MyCreditsWindow winCredits;

    root = DeusExRootWindow(rootWindow);

    if (root != None)
    {
        // Show the credits screen and force the game not to pause
        // if we're showing the credits after the endgame
        winCredits = MyCreditsWindow(root.InvokeMenuScreen(Class'MyCreditsWindow', bLoadIntro));
        winCredits.SetLoadIntro(bLoadIntro);
    }
}